]> git.mxchange.org Git - core.git/commitdiff
Keep compiled Smarty3 templates out ... (I won't switch to Smarty3 but I use this...
authorRoland Haeder <roland@mxchange.org>
Tue, 4 Apr 2017 21:02:00 +0000 (23:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 4 Apr 2017 21:02:00 +0000 (23:02 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
contrib/find-bad-php.sh

index 79cfd1dc31fe1795f4173989dca33cbc718cad29..0144c2c4c889dd2c8f7b223ed4be4a8a8c858b20 100755 (executable)
@@ -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 "<?"`
+       HEADER=$(cat ${SCRIPT} | head -n 1 | grep -v "<?")
 
-       FOOTER=`cat ${SCRIPT} | tail -n 1 | grep "?>"`
+       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