X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=tools%2Flicense_scan.sh;h=47106e0e001cd98a2bbb55cf63d2bac09d031394;hb=0ee30e1c287e82cfa181142ca40c8bd598419b43;hp=329560034435d1e0b0f1ac00c347dd568b69030e;hpb=771f06aae780e07eb9b2929374989b641aae851c;p=osm%2Fdevops.git 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]*$//")