3 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
6 if [ `basename $0` = "guilt" ]; then
7 # being run as standalone
9 # by default, we shouldn't fail
13 # take first arg, and try to execute it
18 if [ ! -x "$dir/guilt-$cmd" ]; then
19 echo "Command $cmd not found" >&2
24 exec "$dir/guilt-$cmd" "$@"
26 # this is not reached because of the exec
27 echo "Exec failed! Something is terribly wrong!" >&2
32 # no args passed or invalid command entered, just output help summary
34 echo "Pick a command:"
35 for x
in `dirname $0`/guilt-
*; do
36 [ -x $x ] && echo -e "\t`basename $x`"
41 echo -e "\tguilt-push"
43 echo -e "\tguilt push"