From a7a62352c46b5d2b37baaa09f8145b1171ca79fb Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 14 Oct 2012 01:14:32 +0200 Subject: o Consistent output when the method is missing. --- .app/lib/app-app | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to '.app') 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 $? } -- cgit v1.2.3