Use [] instead of test.
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
d5b4e09ec4
commit
09a24955df
1 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if ! test -e "index.php"; then
|
if [ ! -e "index.php" ]
|
||||||
|
then
|
||||||
echo "$0: Please execute this script from root directory."
|
echo "$0: Please execute this script from root directory."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -8,7 +9,8 @@ fi
|
||||||
echo "$0: Analysing PHP scripts for syntax errors (lint) ..."
|
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`
|
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`
|
||||||
|
|
||||||
if test "${LINT}" != ""; then
|
if [ -n "${LINT}" ]
|
||||||
|
then
|
||||||
echo "${LINT}"
|
echo "${LINT}"
|
||||||
else
|
else
|
||||||
echo "$0: No syntax errors found."
|
echo "$0: No syntax errors found."
|
||||||
|
|
Loading…
Reference in a new issue