]> source.dussan.org Git - sonarqube.git/commitdiff
[script] Use conditons on cmd directly instead of indirectly on $?
authorJanos Gyerik <janos@kronos>
Thu, 17 Nov 2016 22:41:37 +0000 (23:41 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 23 Nov 2016 13:17:24 +0000 (14:17 +0100)
scripts/start.sh

index 6f23990f827235431aa8275ff64ad12db9829faa..62531e985d6e9a1d376f42bea8ee7b690a30f3c3 100755 (executable)
@@ -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