diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-15 22:29:01 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-15 22:29:01 -0700 |
commit | e1fcc521be3d2ec9e379b3baa974cb805386496d (patch) | |
tree | 0a4bdc3f2eb32d1dbbcb404ced0537a93efbaf31 | |
parent | 8f64fc0a603c728348c14401dafbe2e10709a201 (diff) | |
download | mu-e1fcc521be3d2ec9e379b3baa974cb805386496d.tar.gz |
4349
-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) |