X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=DOCS%2Fvalidator.sh;h=9dea827d03f77191a032ade21b241a2e008f65ea;hb=f71bb5069ef2fc17bb726a6cc91331efc02eb697;hp=95539002a0eabe87b71abcf1912d9f9d18c36c9d;hpb=ae80e170b5d25a4782af90a7c3d81fbb176fa293;p=mailer.git diff --git a/DOCS/validator.sh b/DOCS/validator.sh old mode 100644 new mode 100755 index 95539002a0..9dea827d03 --- a/DOCS/validator.sh +++ b/DOCS/validator.sh @@ -1,3 +1,14 @@ #!/bin/sh -find templates/de/html/ -type f -name *.tpl -exec php DOCS/tpl-validator.php {} \; | grep Warning | cut -d "/" -f 1-5 | grep -v "error parsing attribute name">warnings.log +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 "Warning" | \ + cut -d "/" -f 1-5 | \ + grep -v "error parsing attribute name" > `dirname $0`/template-warnings.log +echo "$0: done."