2016-12-14 12:45:11 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-12-14 12:51:20 +01:00
|
|
|
if [ ! -e "index.php" ]
|
|
|
|
then
|
2016-12-14 12:45:11 +01:00
|
|
|
echo "$0: Please execute this script from root directory."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$0: Analysing PHP scripts for syntax errors (lint) ..."
|
|
|
|
LINT=`find -type f -name "*.php" -exec php -l -f {} 2>&1 \; | grep -v "No syntax errors detected in" | grep -v "FUSE_EDEADLK" | sort --unique`
|
|
|
|
|
2016-12-14 12:51:20 +01:00
|
|
|
if [ -n "${LINT}" ]
|
|
|
|
then
|
2016-12-14 12:45:11 +01:00
|
|
|
echo "${LINT}"
|
|
|
|
else
|
|
|
|
echo "$0: No syntax errors found."
|
|
|
|
fi
|