summaryrefslogtreecommitdiff
path: root/localpbuilder-create
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-create
parente36b9a77b91450defa2ed8f302e7e86b1b0180c3 (diff)
Add and use showhelp function.
Diffstat (limited to 'localpbuilder-create')
-rwxr-xr-xlocalpbuilder-create20
1 files changed, 15 insertions, 5 deletions
diff --git a/localpbuilder-create b/localpbuilder-create
index 97fc6d8..944d451 100755
--- a/localpbuilder-create
+++ b/localpbuilder-create
@@ -1,11 +1,21 @@
#!/bin/sh
+set -e
+
+PRG=$(basename "$0")
+
+function showhelp() {
+ cat <<EOF
+Usage: $PRG POOL [ DISTRIBUTION [ OTHERMIRROR] ]
+
+Examples:
+ $PRG sarge
+ $PRG sarge+hacks sarge 'deb http://example.com/ sarge hacks'
+EOF
+}
+
if [ $# -eq 0 ]; then
- echo "Usage: $(basename $0) POOL [ DISTRIBUTION [ OTHERMIRROR] ]"
- echo ""
- echo "Examples:"
- echo " $(basename $0) sarge"
- echo " $(basename $0) sarge+hacks sarge 'deb http://example.com/ sarge hacks'"
+ showhelp
exit 1
fi