summaryrefslogtreecommitdiff
path: root/localpbuilder-login
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-01-13 18:40:44 +0000
committerJonas Smedegaard <dr@jones.dk>2008-01-13 18:40:44 +0000
commitb776d8e9b9915253861496a48591459b6e5732ac (patch)
treefdfe8270fd464a14013c8322d4229190d7ced655 /localpbuilder-login
parente36b9a77b91450defa2ed8f302e7e86b1b0180c3 (diff)
Add and use showhelp function.
Diffstat (limited to 'localpbuilder-login')
-rwxr-xr-xlocalpbuilder-login16
1 files changed, 13 insertions, 3 deletions
diff --git a/localpbuilder-login b/localpbuilder-login
index a41f368..33d70f2 100755
--- a/localpbuilder-login
+++ b/localpbuilder-login
@@ -1,9 +1,19 @@
#!/bin/sh
+set -e
+
+PRG=$(basename "$0")
+
+function showhelp() {
+ cat <<EOF
+Usage: $PRG POOL [pbuilderopts]
+
+Example: $PRG sarge_with_hacks
+EOF
+}
+
if [ $# -eq 0 ]; then
- echo "Usage: $(basename $0) POOL [pbuilderopts]"
- echo ""
- echo "Example: $(basename $0) sarge_with_hacks"
+ showhelp
exit 1
fi