summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/monkeysphere8
-rwxr-xr-xsrc/monkeysphere-authentication8
-rwxr-xr-xsrc/monkeysphere-host8
3 files changed, 18 insertions, 6 deletions
diff --git a/src/monkeysphere b/src/monkeysphere
index 36ecf93..bc390cc 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -217,9 +217,13 @@ mkdir -p -m 0700 "$GNUPGHOME"
export LOG_LEVEL
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
@@ -285,6 +289,6 @@ case $COMMAND in
*)
failure "Unknown command: '$COMMAND'
-Type '$PGRM help' for usage."
+Try '$PGRM help' for usage."
;;
esac
diff --git a/src/monkeysphere-authentication b/src/monkeysphere-authentication
index 265ca32..dd44efe 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
@@ -217,6 +221,6 @@ case $COMMAND in
*)
failure "Unknown command: '$COMMAND'
-Type '$PGRM help' for usage."
+Try '$PGRM help' for usage."
;;
esac
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