Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support xxdiff for comparing releases (and make it easy to add others) #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions compare-to-official-release
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,18 @@ 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
break
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/