diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-02-04 17:37:40 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-02-04 17:37:40 +0100 |
commit | fc7a39f18241ab731d87f7a80ef2bf36151dc184 (patch) | |
tree | 2426d12ef6a29cd4752a99f2e088ec0d1554c153 /app | |
parent | 0bad1dc709ee21f3e93cfa0866fc0478a5e884a0 (diff) | |
download | app.sh-fc7a39f18241ab731d87f7a80ef2bf36151dc184.tar.gz app.sh-fc7a39f18241ab731d87f7a80ef2bf36151dc184.tar.bz2 app.sh-fc7a39f18241ab731d87f7a80ef2bf36151dc184.tar.xz app.sh-fc7a39f18241ab731d87f7a80ef2bf36151dc184.zip |
o Fixing usage for 'app'.
Diffstat (limited to 'app')
-rwxr-xr-x | app | 25 |
1 files changed, 9 insertions, 16 deletions
@@ -1,20 +1,13 @@ #!/bin/bash -e -usage() { - if [ -n "$1" ] - then - echo "Error:" "$@" >&2 - fi - - echo "usage: $0 <command>" >&2 - echo "" >&2 - echo "Available commands:" >&2 - echo " init" >&2 - echo " conf" >&2 - echo " operate" >&2 - echo "" >&2 - echo "Run $0 -h <group> for more help" >&2 - exit 1 +usage_text() { + echo "usage: $usage_app <command>" + echo "" + echo "Available porcelain commands:" + grep_path "/app-.*$" "$APPSH_HOME/bin" | sed "s,^.*/app-, ," + echo "" + echo "Available plumbing commands:" + grep_path "/app-.*$" "$APPSH_HOME/libexec" | sed "s,^.*/app-, ," } PRG="$0" @@ -38,7 +31,7 @@ while getopts "h" opt do case $opt in h) - usage + show_help ;; D) echo_debug=yes |