From df7a74c6d3ff2b7522e3c4f1d9b7984d24d8b29d Mon Sep 17 00:00:00 2001 From: str4d Date: Wed, 22 Apr 2015 03:41:32 +0000 Subject: [PATCH 1/2] Support xxdiff for comparing releases (and make it easy to add others) --- compare-to-official-release | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/compare-to-official-release b/compare-to-official-release index cb2bffe..ff1658b 100755 --- a/compare-to-official-release +++ b/compare-to-official-release @@ -46,12 +46,17 @@ unzip -lv "$sourcedir2/$jar2" | sed 's,^\(Archive:\s\s*\)/.*/,\1,' > $dir2/unzip zipinfo -lv "$sourcedir2/$jar2" | sed 's,^\(Archive:\s\s*\)/.*/,\1,' > $dir2/zipinfo-lv.txt hexdump -C "$sourcedir2/$jar2" > $dir2/xxd -if which meld > /dev/null; then - meld $dir1 $dir2 -elif which opendiff > /dev/null; then - opendiff $dir1 $dir2 -else - echo "ERROR: meld or opendiff required for the comparison!" +success=false +for DIFF in meld opendiff xxdiff; do + if which $DIFF > /dev/null; then + $DIFF $dir1 $dir2 + success=true + fi +done + +if [ "$success" = false ]; then + echo "ERROR: a merge tool is required for the comparison!" + echo "Supported merge tools are: meld, opendiff and xxdiff." fi rm -rf $tmpdir/ From 3a6e27443d02a1615caa0055495b4caa905345b6 Mon Sep 17 00:00:00 2001 From: str4d Date: Wed, 22 Apr 2015 03:47:39 +0000 Subject: [PATCH 2/2] Break out of the for loop on difftool success --- compare-to-official-release | 1 + 1 file changed, 1 insertion(+) diff --git a/compare-to-official-release b/compare-to-official-release index ff1658b..b3634f8 100755 --- a/compare-to-official-release +++ b/compare-to-official-release @@ -51,6 +51,7 @@ for DIFF in meld opendiff xxdiff; do if which $DIFF > /dev/null; then $DIFF $dir1 $dir2 success=true + break fi done