handle a call with no arguments
authorJoerg Jaspert <joerg@debian.org>
Sat, 4 Jun 2011 11:33:46 +0000 (13:33 +0200)
committerJoerg Jaspert <joerg@debian.org>
Sat, 4 Jun 2011 11:33:46 +0000 (13:33 +0200)
without this we just break on the shift and leave the user without any explanation

movein

diff --git a/movein b/movein
index bf75c6f..9d7e03e 100755 (executable)
--- a/movein
+++ b/movein
@@ -226,6 +226,10 @@ END
 
 }
 
 
 }
 
+if [ $# -lt 1 ]; then
+    usage
+    exit 1
+fi
 
 command=$1 ; shift
 case "$command" in
 
 command=$1 ; shift
 case "$command" in