From 593cd32c436edeb594714dbd0d4421add227c2c3 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Mon, 11 Jan 2010 11:24:16 -0500 Subject: normalize output for monkeysphere when no subcommand is issued or when an unknown subcommand is issued --- src/monkeysphere-host | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/monkeysphere-host') diff --git a/src/monkeysphere-host b/src/monkeysphere-host index 763a37b..4a449de 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -236,9 +236,13 @@ export GNUPGHOME export HOST_FINGERPRINT 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 @@ -315,6 +319,6 @@ case $COMMAND in *) failure "Unknown command: '$COMMAND' -Type '$PGRM help' for usage." +Try '$PGRM help' for usage." ;; esac -- cgit v1.2.3