X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere-authentication;h=8c58645bcb483fb30f04c88ca279806ff6c3e7a6;hb=30bc68284d25706ff91403a8bdb9a6e126d92e23;hp=265ca32957caa4f2ac6d5d12b52cdd7c458423d1;hpb=d23689f462039cb7f6fd8e3e5daee9bd08f6e5a3;p=monkeysphere.git diff --git a/src/monkeysphere-authentication b/src/monkeysphere-authentication index 265ca32..8c58645 100755 --- a/src/monkeysphere-authentication +++ b/src/monkeysphere-authentication @@ -149,9 +149,13 @@ export GNUPGHOME export CORE_KEYLENGTH export LOG_PREFIX +if [ "$#" -eq 0 ] ; then + usage + failure "Please supply a subcommand." +fi + # get subcommand COMMAND="$1" -[ "$COMMAND" ] || (usage; exit 1) shift case $COMMAND in @@ -160,14 +164,14 @@ case $COMMAND in setup ;; - 'update-users'|'update-user'|'u') + 'update-users'|'update-user'|'update'|'u') source "${MASHAREDIR}/setup" setup source "${MASHAREDIR}/update_users" update_users "$@" ;; - 'refresh-keys'|'r') + 'refresh-keys'|'refresh'|'r') source "${MASHAREDIR}/setup" setup gpg_sphere "--keyserver $KEYSERVER --refresh-keys" @@ -207,7 +211,7 @@ case $COMMAND in gpg_sphere "$@" ;; - 'version'|'v') + 'version'|'--version'|'v') version ;; @@ -217,6 +221,6 @@ case $COMMAND in *) failure "Unknown command: '$COMMAND' -Type '$PGRM help' for usage." +Try '$PGRM help' for usage." ;; esac