diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-08-20 13:45:34 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-08-20 13:45:34 +0000 |
commit | 36a8a08cb7d04433489670711cd97103fb9aa0b3 (patch) | |
tree | d97ba0fe8d326a79c03dcb5f1a67efb2ef3a2c8f /scripts/licensecheck.sh | |
parent | 76fe5cb4178939add86d078443a03f21b7a78229 (diff) | |
parent | 04934748ac94407b3f9d7352d5332b0b15677cd3 (diff) | |
download | definitions-36a8a08cb7d04433489670711cd97103fb9aa0b3.tar.gz |
Merge branch 'baserock/pedroalvarez/fix-licensecheck'
Reviewed-by: Richard Maw
Diffstat (limited to 'scripts/licensecheck.sh')
-rwxr-xr-x | scripts/licensecheck.sh | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/scripts/licensecheck.sh b/scripts/licensecheck.sh index a39e62da..c8f53cf2 100755 --- a/scripts/licensecheck.sh +++ b/scripts/licensecheck.sh @@ -58,30 +58,28 @@ texinfo-tarball" gplv3_repos="" -for f in *.morph; do +for f in strata/*.morph; do cp "$f" "$f.bak" done -strata=`grep "morph.*: *" "$system.morph" | cut -d: -f2-` +strata=`grep "morph.*: *" "$system" | cut -d: -f2-` for stratum in $strata; do - chunks=`grep "name.*: *" "$stratum.morph" | cut -d: -f2-` + chunks=`grep -E -- "-? +name.*: *" "$stratum" | cut -d: -f2-` for chunk in $chunks; do - if [ "$chunk" != "$stratum" ]; then - if ! (echo $gplv3_chunks | grep -wq "$chunk"); then - morph edit $chunk 1>&2 - else - repo=`grep "name.*: *$chunk" "$stratum.morph" -A1 | \ - tail -n1 | cut -d: -f3-` - gplv3_repos="$gplv3_repos $repo" - fi + if ! (echo $gplv3_chunks | grep -wq "$chunk"); then + morph edit $chunk 1>&2 + else + repo=`grep "name.*: *$chunk" "$stratum" -A1 | \ + tail -n1 | cut -d: -f3-` + gplv3_repos="$gplv3_repos $repo" fi done done repos=`for stratum in $strata; do - grep "repo.*: *" "$stratum.morph" | cut -d: -f3- + grep "repo.*: *" "$stratum" | cut -d: -f3- done | sort -u` @@ -89,13 +87,13 @@ for repo in $repos; do if ! (echo $gplv3_repos | grep -wq "$repo") && \ [ -d "$workspace/upstream/$repo" ] ; then echo "$repo" - perl licensecheck.pl -r "$workspace/upstream/$repo" | \ + perl scripts/licensecheck.pl -r "$workspace/upstream/$repo" | \ cut -d: -f2- | sort -u echo fi done -for f in *.morph.bak; do +for f in strata/*.morph.bak; do mv "$f" "${f%.bak}" done |