diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-02-01 12:46:56 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-02-01 12:46:56 +0100 |
commit | 0bad1dc709ee21f3e93cfa0866fc0478a5e884a0 (patch) | |
tree | 2acd309f689c0afe9a03c823493443752d4b6960 /bin | |
parent | 97036aeae73cc2a63219c7b792ab5f18c7d98cd1 (diff) | |
download | app.sh-0bad1dc709ee21f3e93cfa0866fc0478a5e884a0.tar.gz app.sh-0bad1dc709ee21f3e93cfa0866fc0478a5e884a0.tar.bz2 app.sh-0bad1dc709ee21f3e93cfa0866fc0478a5e884a0.tar.xz app.sh-0bad1dc709ee21f3e93cfa0866fc0478a5e884a0.zip |
o Consistent usage() usage/flow.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/app-conf | 21 | ||||
-rwxr-xr-x | bin/app-init | 2 |
2 files changed, 9 insertions, 14 deletions
diff --git a/bin/app-conf b/bin/app-conf index 3cf0383..2681f59 100755 --- a/bin/app-conf +++ b/bin/app-conf @@ -69,20 +69,15 @@ conf_import() { mv "$dst.tmp" "$dst" } -usage() { - if [ $# -gt 0 ] - then - echo "Error: $@" >&2 - fi - - echo "usage: $0 conf <command>" >&2 +usage_text() { + echo "usage: $0 conf <command>" echo "" - echo "Available commands:" >&2 - echo " get [name] - returns a single value" >&2 - echo " list - list all config values" >&2 - echo " set [name] [value] - set a config parameter" >&2 - echo " delete [name] - deletes a config parameter" >&2 - echo " import [file] - import a file" >&2 + echo "Available commands:" + echo " get [name] - returns a single value" + echo " list - list all config values" + echo " set [name] [value] - set a config parameter" + echo " delete [name] - deletes a config parameter" + echo " import [file] - import a file" exit 1 } diff --git a/bin/app-init b/bin/app-init index ba97ebd..c59ba77 100755 --- a/bin/app-init +++ b/bin/app-init @@ -8,7 +8,7 @@ APPSH_HOME=$(cd $(dirname "$0")/.. && pwd) . $APPSH_HOME/lib/common # HEADER END -usage_inner() { +usage_text() { echo "usage: $usage_app -d dir <resolver> <resolver args>" } |