]> ToastFreeware Gitweb - gregoa/movein.git/blobdiff - movein
We are using variables - use set -u to be sure we always have them declared
[gregoa/movein.git] / movein
diff --git a/movein b/movein
index 0f13d63b277f5c916b076ed7a0289ef737346da5..f6000fbd36d0cae3336d53b61fb828aea605737c 100755 (executable)
--- a/movein
+++ b/movein
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright © 2008 Mike O'Connor <stew@vireo.org>
 #
@@ -19,6 +19,7 @@
 
 
 set -e
+set -u
 
 usage() {
     bn=$(basename $0)
@@ -226,6 +227,10 @@ END
 
 }
 
+if [ $# -lt 1 ]; then
+    usage
+    exit 1
+fi
 
 command=$1 ; shift
 case "$command" in