X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=DOCS%2Flint.sh;h=1e333eee6adac48f6618ceb1b796b4011216b251;hp=2f79ca40f598645cf8fe771f99f6c77ac9146156;hb=4fbb69b66564237c51d4eaf8c82d0d8cdfcf84a0;hpb=f2aeaab0cd313b2eeb151642455ed558f6b186dc diff --git a/DOCS/lint.sh b/DOCS/lint.sh index 2f79ca40f5..1e333eee6a 100755 --- a/DOCS/lint.sh +++ b/DOCS/lint.sh @@ -1,7 +1,12 @@ #!/bin/sh -echo "$0: Analysing PHP script for syntax errors (lint) ..." -LINT=`find -name "*.php" -exec php -l -f {} 2>&1 \; | grep -v "No syntax errors detected in"` +if ! test -e "modules.php"; then + 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"` if test "${LINT}" != ""; then echo "${LINT}"