X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=DOCS%2Fvalidator.sh;h=9dea827d03f77191a032ade21b241a2e008f65ea;hb=c6a411b7d235e1d3a36321fcb7ac806a0e6509f7;hp=931964e3fa8e3b65580ce1f3a49e5f28c5faffad;hpb=1ebf518b9552f71ee95de6f4b80e6de3a27716d1;p=mailer.git diff --git a/DOCS/validator.sh b/DOCS/validator.sh index 931964e3fa..9dea827d03 100755 --- a/DOCS/validator.sh +++ b/DOCS/validator.sh @@ -1,5 +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..." -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" > `dirname $0`/template-warnings.log +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."