diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-02-01 09:28:18 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-02-01 09:28:18 +0100 |
commit | 97036aeae73cc2a63219c7b792ab5f18c7d98cd1 (patch) | |
tree | b71a4e0ebde196ad7b4858f4dbaf499b7b3b7201 /lib/common | |
parent | 537935edab2e847196a46be68956c8ed2300a22a (diff) | |
download | app.sh-97036aeae73cc2a63219c7b792ab5f18c7d98cd1.tar.gz app.sh-97036aeae73cc2a63219c7b792ab5f18c7d98cd1.tar.bz2 app.sh-97036aeae73cc2a63219c7b792ab5f18c7d98cd1.tar.xz app.sh-97036aeae73cc2a63219c7b792ab5f18c7d98cd1.zip |
libexec/app-resolver-maven: Better argument checking.
lib/common: Starting a way to have a common usage/help semantics.
Diffstat (limited to 'lib/common')
-rwxr-xr-x | lib/common | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -40,6 +40,21 @@ assert_is_app() { fi } +usage() { + message=${1-} + + if [[ $message != "" ]] + then + echo $message + fi + + if [ "`declare -f usage_inner >/dev/null; echo $?`" = 0 ] + then + usage_inner >&2 + fi + exit 1 +} + debug() { [[ $echo_debug == no ]] || echo "D: $usage_app: $@" 2>&1 } |