Tests: Wait a second before recommiting a change
[gc-utils.git] / gc-utils.sh
blobf58d18f11bbd25481a563447bc7d25eaef259fed
1 #!/bin/sh
2 # Copyright (c) 2008 David Soria Parra <dsp at php dot net>
4 # Licensed under the terms of the MIT License
5 # See /usr/share/doc/gcutils/copyright
6 # or http://www.opensource.org/licenses/mit-license.php
8 . $LIBDIR$/gc-sh-setup
10 COMMANDS="gc-commit gc-import gc-multi-commit gc-update"
12 if test $# -lt 1
13 then
14 echo "$PROGNAME: $VERSION"
15 echo "available commands"
16 for cmd in $COMMANDS
17 do
18 echo -n " " && whatis $cmd | cut -b 4-
19 done
20 echo
21 else
22 case "$1" in
23 -V)
24 version
26 help)
27 for cmd in $COMMANDS
29 if test "$cmd" = "gc-$2"
30 then
31 man $cmd
32 exit 0
34 done
35 echo "Command $2 not found" 1>&2
36 exit 127
39 for cmd in $COMMANDS
41 if test "$cmd" = "gc-$1"
42 then
43 shift
44 $cmd $*
45 exit 0
47 done
48 echo "Command $1 not found" 1>&2
49 exit 127
51 esac