From c7f35240b0fddd27e15e4acb0e79ac74cba090eb Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Fri, 1 Sep 2017 11:43:23 +0200 Subject: [PATCH] Fix string comparison to work with sh Change-Id: I8f85afcde0c953ba175410257485a7a68f892cff Signed-off-by: garciadeblas --- tools/license_scan.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/license_scan.sh b/tools/license_scan.sh index 32956003..47106e0e 100755 --- a/tools/license_scan.sh +++ b/tools/license_scan.sh @@ -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]*$//") -- 2.25.1