From 0bad1dc709ee21f3e93cfa0866fc0478a5e884a0 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 1 Feb 2013 12:46:56 +0100 Subject: o Consistent usage() usage/flow. --- bin/app-conf | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'bin/app-conf') 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 " >&2 +usage_text() { + echo "usage: $0 conf " 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 } -- cgit v1.2.3