X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere-authentication;h=8c58645bcb483fb30f04c88ca279806ff6c3e7a6;hb=307c66fdfd5e9f3851d4a5086798655257d14a80;hp=df7d9bcf6ddf8fd2db17971973a37b7ca20ec0c8;hpb=6ef7064d32718cc3b93f1c240e5e88c48fa4cf66;p=monkeysphere.git diff --git a/src/monkeysphere-authentication b/src/monkeysphere-authentication index df7d9bc..8c58645 100755 --- a/src/monkeysphere-authentication +++ b/src/monkeysphere-authentication @@ -136,7 +136,6 @@ LOG_PREFIX=${MONKEYSPHERE_LOG_PREFIX:='ms: '} # export variables needed in su invocation export DATE -export MODE export LOG_LEVEL export KEYSERVER export MONKEYSPHERE_USER @@ -150,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" ] || failure "Type '$PGRM help' for usage." shift case $COMMAND in @@ -161,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" @@ -208,7 +211,7 @@ case $COMMAND in gpg_sphere "$@" ;; - 'version'|'v') + 'version'|'--version'|'v') version ;; @@ -218,6 +221,6 @@ case $COMMAND in *) failure "Unknown command: '$COMMAND' -Type '$PGRM help' for usage." +Try '$PGRM help' for usage." ;; esac