summaryrefslogtreecommitdiffstats
path: root/tools/update-packaging/test/diffmar.sh
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /tools/update-packaging/test/diffmar.sh
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'tools/update-packaging/test/diffmar.sh')
-rwxr-xr-xtools/update-packaging/test/diffmar.sh51
1 files changed, 51 insertions, 0 deletions
diff --git a/tools/update-packaging/test/diffmar.sh b/tools/update-packaging/test/diffmar.sh
new file mode 100755
index 000000000..771b6b0ce
--- /dev/null
+++ b/tools/update-packaging/test/diffmar.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+# Compares two mars
+
+marA="$1"
+marB="$2"
+testDir="$3"
+workdir="/tmp/diffmar/$testDir"
+fromdir="$workdir/0"
+todir="$workdir/1"
+
+# On Windows, creation time can be off by a second or more between the files in
+# the fromdir and todir due to them being extracted synchronously so use
+# time-style and exclude seconds from the creation time.
+lsargs="-algR"
+unamestr=`uname`
+if [ ! "$unamestr" = 'Darwin' ]; then
+ unamestr=`uname -o`
+ if [ "$unamestr" = 'Msys' -o "$unamestr" = "Cygwin" ]; then
+ lsargs="-algR --time-style=+%Y-%m-%d-%H:%M"
+ fi
+fi
+
+rm -rf "$workdir"
+mkdir -p "$fromdir"
+mkdir -p "$todir"
+
+cp "$1" "$fromdir"
+cp "$2" "$todir"
+
+cd "$fromdir"
+mar -x "$1"
+rm "$1"
+mv updatev2.manifest updatev2.manifest.bz2
+bzip2 -d updatev2.manifest.bz2
+mv updatev3.manifest updatev3.manifest.bz2
+bzip2 -d updatev3.manifest.bz2
+ls $lsargs > files.txt
+
+cd "$todir"
+mar -x "$2"
+rm "$2"
+mv updatev2.manifest updatev2.manifest.bz2
+bzip2 -d updatev2.manifest.bz2
+mv updatev3.manifest updatev3.manifest.bz2
+bzip2 -d updatev3.manifest.bz2
+ls $lsargs > files.txt
+
+echo "diffing $fromdir and $todir"
+echo "on linux shell sort and python sort return different results"
+echo "which can cause differences in the manifest files"
+diff -ru "$fromdir" "$todir"