summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-06 15:54:17 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-06 15:54:17 +0300
commit0127f528c76c4c07c5841c69c6183a04b6313455 (patch)
treecef9685c0a2b12af91df7b9431070a3d9945bc06
parent5ae66b037a053fae891c3cbb3819103b4460ca7d (diff)
downloadevol-tools-0127f528c76c4c07c5841c69c6183a04b6313455.tar.gz
evol-tools-0127f528c76c4c07c5841c69c6183a04b6313455.tar.bz2
evol-tools-0127f528c76c4c07c5841c69c6183a04b6313455.tar.xz
evol-tools-0127f528c76c4c07c5841c69c6183a04b6313455.zip
add license check tool. For now it can check only client-data repo.
-rwxr-xr-xlicensecheck/checkfile.sh9
-rwxr-xr-xlicensecheck/clientdata.sh9
2 files changed, 18 insertions, 0 deletions
diff --git a/licensecheck/checkfile.sh b/licensecheck/checkfile.sh
new file mode 100755
index 0000000..4b7a9d9
--- /dev/null
+++ b/licensecheck/checkfile.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+export name="$2"
+export name=${name##../../client-data/}
+
+grep " $name " $1 >/dev/null
+if [ "$?" != 0 ]; then
+ echo "Missing license for $name"
+fi
diff --git a/licensecheck/clientdata.sh b/licensecheck/clientdata.sh
new file mode 100755
index 0000000..016952b
--- /dev/null
+++ b/licensecheck/clientdata.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+export DIR="../../client-data"
+
+echo Checking png files
+find $DIR -type f -name "*.png" -exec ./checkfile.sh $DIR/LICENSE {} \;
+
+echo Checking ogg files
+find $DIR/sfx -type f -name "*.ogg" -exec ./checkfile.sh $DIR/LICENSE {} \;