File: mkCopyright.sh

package info (click to toggle)
requirejs 2.3.2-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 15,940 kB
  • ctags: 974
  • sloc: sh: 75; makefile: 6
file content (20 lines) | stat: -rwxr-xr-x 722 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

echo "This script helps you to find files which are not documented"
echo "in debian/copyright. When a set of files has been documented,"
echo "please write a short regexp into $0's source."

# write the regexps of already documented files there:

alreadyOKpatterns='uglifyjs2|uglify|source-map|esprima|opto.build|blank|xpconnect|/node|/browser|/rhino'


for f in $(find build/jslib -name "*.js"| grep -Ev "$alreadyOKpatterns"); do
    if !(cat $f | head -n 10 | grep -q "The Dojo Foundation All Rights Reserved"); then
	echo "============= $f ================"
	l="$(cat $f | head -n 10 | grep -i license)"
	c="$(cat $f | head -n 10 | grep -Ei 'copyright|\(c\)')"
	echo "License: $l"
	echo "©: $c"
    fi
done