add 'device' option in create_ni_files.sh.
authorragmani <ragmani0216@gmail.com>
Wed, 16 Aug 2017 02:28:45 +0000 (11:28 +0900)
committerragmani <ragmani0216@gmail.com>
Wed, 16 Aug 2017 02:28:45 +0000 (11:28 +0900)
Change-Id: I86afc601390b79fd311939d386efcf64fe599823
Signed-off-by: ragmani <ragmani0216@gmail.com>
script/create_ni_files.sh

index ded6c7d..282664b 100755 (executable)
@@ -2,11 +2,12 @@
 
 usage()
 {
-    echo "Usage: $0 [device-name] --prefix-dir=### --overlay-dir=###"
-    echo "device-name - You can get the name by using 'sdb devices' command"
+    echo "Usage: $0 --device=[name] --overlay-dir=###"
+    echo "--device      - If there are more than one target,"
+    echo "                you should pass the device name by using 'sdb devices' command"
     echo "--overlay-dir - You can specify the path of overlay"
-    echo "--environment  - You can specify the environment variable for performing the unittest"
-    echo "--options  - You can specify options for creating ni files"
+    echo "--environment - You can specify the environment variable for performing the unittest"
+    echo "--options     - You can specify options for creating ni files"
     exit 1
 }
 
@@ -27,6 +28,9 @@ do
         usage
         exit 1
         ;;
+    --device=*)
+        opt="-s "${i#*=}
+        ;;
     --prefix-dir=*)
         clrdir=${i#*=}
         ;;
@@ -40,7 +44,8 @@ do
         options=${i#*=}
         ;;
     *)
-        opt="-s ${i#*}"
+        usage
+        exit 1
         ;;
     esac
     shift