diff options
Diffstat (limited to 'subx')
-rwxr-xr-x | subx/ggdiff | 22 | ||||
-rwxr-xr-x | subx/xdiff | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/subx/ggdiff b/subx/ggdiff new file mode 100755 index 00000000..e2263ec2 --- /dev/null +++ b/subx/ggdiff @@ -0,0 +1,22 @@ +#!/usr/bin/env zsh +# git diff a specific example's generated binary after converting through xxd. + +if [ $# -eq 0 ] +then + echo "ggdiff <target> [rev]" + exit 1 +fi + +target=$1 +rev=${2:-HEAD} + +tmp=`mktemp` + +if [[ $target == 'test'* ]] +then + git show ${rev}:subx/teensy/$target > $tmp + xdiff $tmp teensy/$target +else + git show ${rev}:subx/$target > $tmp + xdiff $tmp $target +fi diff --git a/subx/xdiff b/subx/xdiff new file mode 100755 index 00000000..3e0c034d --- /dev/null +++ b/subx/xdiff @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh +# Compare xxd output of two files. + +diff -u <(xxd $1) <(xxd $2) |