Last active
July 17, 2017 14:13
-
-
Save softprops/e57371151a7135a451472ae6fedc590f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
jarfile1=$1 | |
jarfile2=$2 | |
tmpdir=`mktemp -d -t jiff-XXX` | |
echo $tmpdir | |
mkdir -p $tmpdir/{dir1,dir2} | |
cp $jarfile1 $tmpdir/dir1 | |
cp $jarfile2 $tmpdir/dir2 | |
cd $tmpdir/dir1 | |
jar xvf $(basename $jarfile1) | |
for i in `find $tmpdir/dir1 -name "*.class"` | |
do | |
javap $i > ${i}.txt #list the functions/variables etc | |
done | |
cd $tmpdir/dir2 | |
jar xvf $(basename $jarfile2) | |
for i in `find $tmpdir/dir2 -name "*.class"` | |
do | |
javap $i > ${i}.txt #list the functions/variables etc | |
done | |
diff -r $tmpdir/dir1 $tmpdir/dir2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment