From e06cac420b0eb92c04d5cc74f65bc542b217c24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Wed, 14 Dec 2016 12:51:20 +0100 Subject: [PATCH] Use [] instead of test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- util/lint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/lint.sh b/util/lint.sh index ef1530f859..844a0eadd6 100755 --- a/util/lint.sh +++ b/util/lint.sh @@ -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."