about summary refs log tree commit diff stats
path: root/subx/gg
blob: b733a58d2ec67618ab1032110b69ac280d60cc06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env zsh
# Run git commands on a specific example's generated binary.

if [ $# -eq 0 ]
then
  echo "g <git command> <args> <target>"
  exit 1
fi

arg=( $* )
target=$arg[${#arg[@]}]
unset "arg[${#arg[@]}]"

if [[ $target == 'test'* ]]
then
  git ${arg[@]} ./teensy/$target
else
  git ${arg[@]} ./$target
fi