diff options
author | Jonas Smedegaard <dr@jones.dk> | 2008-01-13 18:26:13 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2008-01-13 18:26:13 +0000 |
commit | 16502ec50e23a1c9284b1eaef8ba86d8fd670de2 (patch) | |
tree | 2bde21230a425df83e427cd68080b059e459800b /localcowbuilder-login | |
parent | 9cf38c2ec99a3fe664a9dc39d19af5f542c19a8d (diff) |
Add and use showhelp function.
Diffstat (limited to 'localcowbuilder-login')
-rwxr-xr-x | localcowbuilder-login | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/localcowbuilder-login b/localcowbuilder-login index 2074f2c..b08dc33 100755 --- a/localcowbuilder-login +++ b/localcowbuilder-login @@ -1,9 +1,19 @@ #!/bin/sh +set -e + +PRG=$(basename "$0") + +function showhelp() { + cat <<EOF +Usage: $PRG POOL [cowbuilderopts] + +Example: $PRG sarge_with_hacks +EOF +} + if [ $# -eq 0 ]; then - echo "Usage: $(basename $0) POOL [cowbuilderopts]" - echo "" - echo "Example: $(basename $0) sarge_with_hacks" + showhelp exit 1 fi |