From 6946d773d9f2f583cd6ed37aef4e2395988d6c3f Mon Sep 17 00:00:00 2001 From: Janos Gyerik Date: Thu, 17 Nov 2016 23:41:37 +0100 Subject: [PATCH] [script] Use conditons on cmd directly instead of indirectly on $? --- scripts/start.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 6f23990f827..62531e985d6 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -24,15 +24,13 @@ else OS='linux-x86-64' fi -ls sonar-application/target/sonarqube-*.zip &> /dev/null -if [ "$?" != "0" ]; then +if ! ls sonar-application/target/sonarqube-*.zip &> /dev/null; then echo 'Sources are not built' ./build.sh fi cd sonar-application/target/ -ls sonarqube-*/bin/$OS/sonar.sh &> /dev/null -if [ "$?" != "0" ]; then +if ! ls sonarqube-*/bin/$OS/sonar.sh &> /dev/null; then echo "Unzipping SQ..." unzip -qq sonarqube-*.zip fi -- 2.39.5