Fix string comparison to work with sh 19/2119/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 1 Sep 2017 09:43:23 +0000 (11:43 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 1 Sep 2017 09:43:23 +0000 (11:43 +0200)
Change-Id: I8f85afcde0c953ba175410257485a7a68f892cff
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
tools/license_scan.sh

index 3295600..47106e0 100755 (executable)
@@ -33,7 +33,8 @@ for file in $(git diff --name-only origin/$GERRIT_BRANCH); do
     if [ -f $file ]; then
         if [ -s $file ]; then
             license=$(wget -qO - --post-file $file https://osm.etsi.org/fossology/?mod=agent_nomos_once |sed "s/^[ \t]*//;s/[ \t]*$//")
-            if [[ $license =~ $RE ]]; then
+            result=$(echo $license | grep "$RE")
+            if [ -n "$result" ]; then
                 # possibly we have exceeded the post rate
                 sleep 10
                 license=$(wget -qO - --post-file $file https://osm.etsi.org/fossology/?mod=agent_nomos_once |sed "s/^[ \t]*//;s/[ \t]*$//")