diff --git a/tools/license_scan.sh b/tools/license_scan.sh index 329560034435d1e0b0f1ac00c347dd568b69030e..47106e0e001cd98a2bbb55cf63d2bac09d031394 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]*$//")