From 0127f528c76c4c07c5841c69c6183a04b6313455 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 6 Jul 2016 15:54:17 +0300 Subject: add license check tool. For now it can check only client-data repo. --- licensecheck/checkfile.sh | 9 +++++++++ licensecheck/clientdata.sh | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100755 licensecheck/checkfile.sh create mode 100755 licensecheck/clientdata.sh (limited to 'licensecheck') 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 {} \; -- cgit v1.2.3-70-g09d2