-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]*$//")
- 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]*$//")
+ if $binary ; then
+ license=Binary
+ else
+ license="No Apache license found"
+ if [ -f $file ]; then
+ if [ -s $file ]; then
+ if [ $(grep -c "http://www.apache.org/licenses/LICENSE-2.0" $file) -ge 1 ] ; then
+ license="Apache-2.0"
+ fi