about summary refs log tree commit diff stats
path: root/subx/gg
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-07 10:57:56 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-07 10:57:56 -0700
commitebe2bda37b74bc73550a051895b1831f8c2441ca (patch)
tree00e214e4ef8b2167e00f8d7066225ce03ed87117 /subx/gg
parent37b3206e49572cf245ef7ee13d5bd24845f6a2e8 (diff)
downloadmu-ebe2bda37b74bc73550a051895b1831f8c2441ca.tar.gz
4321
Modify helpers to run either external examples in the subx/teensy/
directory, or my own examples in subx/ directory.

Now I have to say `run test5` instead of `run 5`, and so on.
Diffstat (limited to 'subx/gg')
-rwxr-xr-xsubx/gg11
1 files changed, 8 insertions, 3 deletions
diff --git a/subx/gg b/subx/gg
index 03b356f3..b733a58d 100755
--- a/subx/gg
+++ b/subx/gg
@@ -3,12 +3,17 @@
 
 if [ $# -eq 0 ]
 then
-  echo "g <git command> <args> <suffix>"
+  echo "g <git command> <args> <target>"
   exit 1
 fi
 
 arg=( $* )
-suffix=$arg[${#arg[@]}]
+target=$arg[${#arg[@]}]
 unset "arg[${#arg[@]}]"
 
-git ${arg[@]} ./teensy/test$suffix
+if [[ $target == 'test'* ]]
+then
+  git ${arg[@]} ./teensy/$target
+else
+  git ${arg[@]} ./$target
+fi