Backed out 4 changesets (bug 1858627) for causing clipboard/paste failures. CLOSED...
[gecko.git] / tools / update-packaging / test / diffmar.sh
blob4b16ffb77a76904e7464bae66e132b5b0a680198
1 #!/bin/bash
2 # Compares two mars
4 marA="$1"
5 marB="$2"
6 testDir="$3"
7 workdir="/tmp/diffmar/$testDir"
8 fromdir="$workdir/0"
9 todir="$workdir/1"
11 # On Windows, creation time can be off by a second or more between the files in
12 # the fromdir and todir due to them being extracted synchronously so use
13 # time-style and exclude seconds from the creation time.
14 lsargs="-algR"
15 unamestr=`uname`
16 if [ ! "$unamestr" = 'Darwin' ]; then
17 unamestr=`uname -o`
18 if [ "$unamestr" = 'Msys' -o "$unamestr" = "Cygwin" ]; then
19 lsargs="-algR --time-style=+%Y-%m-%d-%H:%M"
23 rm -rf "$workdir"
24 mkdir -p "$fromdir"
25 mkdir -p "$todir"
27 cp "$1" "$fromdir"
28 cp "$2" "$todir"
30 cd "$fromdir"
31 mar -x "$1"
32 rm "$1"
33 rm -f updatev2.manifest # Older files may contain this
34 mv updatev3.manifest updatev3.manifest.xz
35 xz -d updatev3.manifest.xz
36 ls $lsargs > files.txt
38 cd "$todir"
39 mar -x "$2"
40 rm "$2"
41 mv updatev3.manifest updatev3.manifest.xz
42 xz -d updatev3.manifest.xz
43 ls $lsargs > files.txt
45 echo "diffing $fromdir and $todir"
46 echo "on linux shell sort and python sort return different results"
47 echo "which can cause differences in the manifest files"
48 diff -ru "$fromdir" "$todir"