From 34f79c4efd45c781ba0d16b24ac9d5bda9b4a00c Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 4 Apr 2017 23:02:00 +0200 Subject: [PATCH] Keep compiled Smarty3 templates out ... (I won't switch to Smarty3 but I use this script for other project). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- contrib/find-bad-php.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.5