summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2016-06-21 12:41:32 +0200
committerFlorian Frank <flori@ping.de>2016-06-21 12:41:32 +0200
commit5d2835905b98361e7de877a0174f285c905d28fe (patch)
treeade29257d8cc7c512515681bddb3887b749d0f30
parent7730d138c32f15c9015e1ad7127d4f158ffe6ab5 (diff)
downloadjson-5d2835905b98361e7de877a0174f285c905d28fe.tar.gz
Make it interactive
-rwxr-xr-xtools/diff.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/diff.sh b/tools/diff.sh
index 3fd5829..89385b0 100755
--- a/tools/diff.sh
+++ b/tools/diff.sh
@@ -4,8 +4,15 @@ files=`find ext -name '*.[ch]' -o -name parser.rl`
for f in $files
do
- echo $f
b=`basename $f`
g=`find ../ruby/ext/json -name $b`
- diff -u $f $g | less
+ d=`diff -u $f $g`
+ test -z "$d" && continue
+ echo "$d"
+ read -p "Edit diff of $b? " a
+ case $a in
+ [yY]*)
+ vimdiff $f $g
+ ;;
+ esac
done