-
Pavel Vyskočil authored
* Change the structure of repository to be able to store all proxyIdP scripts, not only nagios scripts
Pavel Vyskočil authored* Change the structure of repository to be able to store all proxyIdP scripts, not only nagios scripts
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
php_syntax_check.sh 464 B
#!/bin/bash
#The root directory to check
dir="/etc/simplesamlphp"
cd $dir
paths=$(find . -type f -name "*.php")
globalResult=""
for path in $paths
do
if [[ -f $path ]] ; then
result=$(php -l $path 2>&1)
if [[ ! $result =~ ^No.syntax.errors.*$ ]] ; then
globalResult+="$result | "
fi
fi
done
if [[ -z $globalResult ]] ; then
echo "0 php_syntax_check - OK"
else
echo "2 php_syntax_check - $globalResult"
fi