chiark / gitweb /
depend: Fix help listing
authorJonas Fonseca <fonseca@diku.dk>
Thu, 25 Sep 2008 10:50:40 +0000 (12:50 +0200)
committerPetr Baudis <pasky@suse.cz>
Thu, 25 Sep 2008 13:23:03 +0000 (15:23 +0200)
Without this `tg help depend` causes all kinds of trouble such as adding
empty lines to .topdeps.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tg-depend.sh

index af78808805449428ca0db06a2c5076ae116ac6a2..498eec4e3e0018c0d57c6f24ee788e7e13aaf48c 100644 (file)
@@ -9,6 +9,10 @@ name=
 ## Parse options
 
 subcmd="$1"; shift
+[ "$subcmd" = "-h" ] && {
+       echo "Usage: tg [...] depend add NAME" >&2
+       exit 1
+}
 [ "$subcmd" = "add" ] || die "unknown subcommand ($subcmd)"
 
 while [ -n "$1" ]; do