forked from chummer5a/chummer5a
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmklicese.sh
More file actions
19 lines (17 loc) · 740 Bytes
/
mklicese.sh
File metadata and controls
19 lines (17 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
find . -type f -name '*.cs' ! -name '*.Designer.cs' ! -ipath 'packages/*' ! -ipath '*/packages/*' ! -ipath 'bin/*' ! -ipath '*/bin/*' -print0 | while IfS= read -r -d '' file; do
if ! grep -q 'General Public License' "$file"
then
echo Processing cs \" "$file" \" 1>&2
cat cs_license.txt "$file" >"$file.new" && mv "$file.new" "$file"
fi
done
find . -type f -name '*.xml' ! -ipath 'packages/*' ! -ipath '*/packages/*' ! -ipath 'bin/*' ! -ipath '*/bin/*' -print0 | while Ifs= read -r -d '' file; do
if ! grep -q 'General Public License' "$file"
then
echo Processing Xml \" "$file" \" 1>&2
cat xml_license.txt > "$file.new";
cat "$file" | sed 1d >> "$file.new";
mv "$file.new" "$file"
fi
done