diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-10-14 01:14:32 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-10-14 01:14:32 +0200 |
commit | a7a62352c46b5d2b37baaa09f8145b1171ca79fb (patch) | |
tree | 681d65114e9db978010e969a08ca18173e93f39d /.app/lib/app-app | |
parent | 3fc4ff425546670c979b8bc62e7debe5b5c1a77a (diff) | |
download | app.sh-a7a62352c46b5d2b37baaa09f8145b1171ca79fb.tar.gz app.sh-a7a62352c46b5d2b37baaa09f8145b1171ca79fb.tar.bz2 app.sh-a7a62352c46b5d2b37baaa09f8145b1171ca79fb.tar.xz app.sh-a7a62352c46b5d2b37baaa09f8145b1171ca79fb.zip |
o Consistent output when the method is missing.
Diffstat (limited to '.app/lib/app-app')
-rw-r--r-- | .app/lib/app-app | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/.app/lib/app-app b/.app/lib/app-app index 30d2007..130244e 100644 --- a/.app/lib/app-app +++ b/.app/lib/app-app @@ -6,7 +6,7 @@ then else repo="http://repo1.maven.org" fi - + # TODO: support file:// repositories # TODO: look in the local repository first # TODO: assert that we got a 200 OK @@ -420,10 +420,10 @@ method_app_usage() { method_app() { local name="$1"; shift local instance="$1"; shift + local method="$1" if [ $# -gt 0 ] then - method=$1 shift fi @@ -432,7 +432,14 @@ method_app() { list) method_list "$name" "$instance" "$@" ;; list-versions) method_list_versions "$name" "$instance" "$@" ;; set-current) method_set_current "$name" "$instance" "$@" ;; - *) method_app_usage "Unknown method $method" ;; + *) + if [ -z "$method" ] + then + method_app_usage + else + method_app_usage "Unknown method $method" + fi + ;; esac exit $? } |