]> git.mxchange.org Git - friendica.git/commitdiff
Use [] instead of test.
authorRoland Häder <roland@mxchange.org>
Wed, 14 Dec 2016 11:51:20 +0000 (12:51 +0100)
committerRoland Häder <roland@mxchange.org>
Mon, 19 Dec 2016 13:23:09 +0000 (14:23 +0100)
Signed-off-by: Roland Häder <roland@mxchange.org>
util/lint.sh

index ef1530f859af487c7875818e80762e9525183fcd..844a0eadd6c6b44706457abbf2da9acc65f7e8b9 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
-if ! test -e "index.php"; then
+if [ ! -e "index.php" ]
+then
        echo "$0: Please execute this script from root directory."
        exit 1
 fi
@@ -8,7 +9,8 @@ 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`
 
-if test "${LINT}" != ""; then
+if [ -n "${LINT}" ]
+then
        echo "${LINT}"
 else
        echo "$0: No syntax errors found."