1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 17:59:21 +02:00
ampache/scripts/tests/syntax.sh
2013-11-17 16:49:36 +01:00

11 lines
301 B
Bash

#!/bin/bash
echo -e "\e[1;34mChecking syntax error\e[00m"
output=$(find . -name '*.php' -exec php --syntax-check {} \; | grep -v 'No syntax errors detected in')
if [[ $output ]]
then
echo -e '\e[00;31mPlease check files syntax\e[00m'
exit 1
else
echo -e "\e[1;32mSyntax is OK\e[00m"
fi