normalize output for monkeysphere when no subcommand is issued or when an unknown...
[monkeysphere.git] / src / monkeysphere-authentication
index 265ca32957caa4f2ac6d5d12b52cdd7c458423d1..dd44efe8637a6392c4a9c74a1405ff95663a8fab 100755 (executable)
@@ -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
@@ -217,6 +221,6 @@ case $COMMAND in
 
     *)
         failure "Unknown command: '$COMMAND'
-Type '$PGRM help' for usage."
+Try '$PGRM help' for usage."
         ;;
 esac