From 67cbf3751c594aea88a71e350259943370b51b5f Mon Sep 17 00:00:00 2001 From: root Date: Sat, 24 Sep 2011 19:12:23 +0200 Subject: //god/licht: add long help for noise --- god/licht | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'god') diff --git a/god/licht b/god/licht index cd67d338..9284f622 100755 --- a/god/licht +++ b/god/licht @@ -14,18 +14,39 @@ # 0-7 - toggles individual lights TOGGLE=`echo "$2" | sed -n '/^[0-1]/p'` +shorthelp() { + echo "Usage: $0 [OPTIONS] [0|1]" + echo "Toggle the lights in the shack." +} +longhelp(){ + shorthelp + +cat < <0/1>" + longhelp + exit 1 else echo "Toggle light $LAMPE ($TOGGLE)" printf "$STRING" | nc -u -w1 licht.shack 1337 @@ -73,9 +94,11 @@ porsche(){ } case "$1" in - --help) - echo "Toggle the lights" - echo "Usage: lich <0/1>" + (--help) + if [ "$2" == "--verbose" ] + then longhelp + else shorthelp + fi ;; all) toggle_all -- cgit v1.2.3