Fix empty parameter
[anna.git] / example / diameter / launcher / resources / scripts / tinyTestcase.sh
index f2b30d5..b588dc2 100755 (executable)
@@ -59,7 +59,7 @@ usage() {
   echo
   echo "       timeout:"
   echo
-  echo "         Timeout in seconds for the testcase. By default, no timeout will be programmed for the testcase."
+  echo "         Timeout in seconds for the testcase. If not provided, no timeout will be programmed for the testcase."
   echo
   echo
   echo
@@ -119,6 +119,7 @@ update_testcase () {
 #############
 echo
 SOURCE_DIR=$1
+│[ -z "$SOURCE_DIR" ] && usage
 SOURCE_DIR=`readlink -f $SOURCE_DIR`
 [ ! -d "$SOURCE_DIR" ] && _exit "Can't found provided directory '$SOURCE_DIR'"
 # Work on source directory: