]> git.mxchange.org Git - mailer.git/blobdiff - contrib/validator.sh
Moved to contrib/ in preperation for merge
[mailer.git] / contrib / validator.sh
diff --git a/contrib/validator.sh b/contrib/validator.sh
new file mode 100755 (executable)
index 0000000..21eacf7
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if ! test -e "modules.php"; then
+  echo "$0: Please execute this script from root directory."
+  exit 1
+fi
+
+echo "$0: Validating all templates..."
+DUMMY=`find templates/de/html/ -type f -name *.tpl -exec php DOCS/tpl-validator.php {} \; 2>&1`
+echo "${DUMMY}" | \
+       grep "PHP Warning" | \
+       cut -d "/" -f 1-5 | \
+       grep -v "error parsing attribute name in" > DOCS/template-warnings.log
+echo "$0: done."