Clean up handling argument of the gbsbuild script for Tizen.
authorjihwan.seo <jihwan.seo@samsung.com>
Tue, 27 Sep 2016 04:22:34 +0000 (13:22 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 29 Sep 2016 06:52:36 +0000 (06:52 +0000)
Change-Id: Idb7925a3b83bfe31b66139af72597310c9bb3b1e
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12253
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
gbsbuild.sh

index 487733b..a26c5d4 100755 (executable)
@@ -69,15 +69,21 @@ fi
 withtcp=0
 withcloud=0
 withproxy=0
-if [ "WITH_TCP" = "$1" ] || [ "WITH_TCP" = "$2" ]  || [ "WITH_TCP" = "$3" ];then
-    withtcp=1
-fi
-if [ "WITH_CLOUD" = "$1" ] || [ "WITH_CLOUD" = "$2" ] || [ "WITH_CLOUD" = "$3" ];then
-    withcloud=1
-fi
-if [ "WITH_PROXY" = "$1" ] || [ "WITH_PROXY" = "$2" ] || [ "WITH_PROXY" = "$3" ];then
-    withproxy=1
-fi
+for ARGUMENT_VALUE in $*
+do
+   echo $ARGUMENT_VALUE
+   if [ "WITH_TCP" = $ARGUMENT_VALUE ];then
+       withtcp=1
+   fi
+
+   if [ "WITH_CLOUD" = $ARGUMENT_VALUE ];then
+       withcloud=1
+   fi
+
+   if [ "WITH_PROXY" = $ARGUMENT_VALUE ];then
+       withproxy=1
+   fi
+done
 
 echo "Calling core gbs build command"
 gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' --define 'WITH_PROXY $withproxy' -B ~/GBS-ROOT-OIC --include-all --repository ./"