From: Roland Haeder Date: Tue, 4 Apr 2017 21:02:00 +0000 (+0200) Subject: Keep compiled Smarty3 templates out ... (I won't switch to Smarty3 but I use this... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=34f79c4efd45c781ba0d16b24ac9d5bda9b4a00c;p=core.git Keep compiled Smarty3 templates out ... (I won't switch to Smarty3 but I use this script for other project). Signed-off-by: Roland Häder --- diff --git a/contrib/find-bad-php.sh b/contrib/find-bad-php.sh index 79cfd1dc..0144c2c4 100755 --- a/contrib/find-bad-php.sh +++ b/contrib/find-bad-php.sh @@ -1,13 +1,13 @@ #!/bin/sh echo "$0: Searching for PHP scripts (except 3rd party) ..." -PHP=`find -type f -name "*.php" 2>&1 | grep -v "third_party"` +PHP=$(find -type f -name "*.php" 2>&1 | grep -v "third_party" | grep -v "smarty3/compiled/") for SCRIPT in ${PHP}; do - HEADER=`cat ${SCRIPT} | head -n 1 | grep -v ""` + FOOTER=$(cat ${SCRIPT} | tail -n 1 | grep "?>") if [ -n "${HEADER}" ]; then @@ -19,7 +19,7 @@ do echo "$0: Script '${SCRIPT}' has discouraged footer." fi - LINT=`php -l "${SCRIPT}" 2>&1 | grep -v "Constant FUSE_EDEADLK already defined in Unknown on line 0" | grep -v "No syntax errors detected in"` + LINT=$(php -l "${SCRIPT}" 2>&1 | grep -v "Constant FUSE_EDEADLK already defined in Unknown on line 0" | grep -v "No syntax errors detected in") if [ -n "${LINT}" ] then