Skip to content

Commit

Permalink
[script] Use conditons on cmd directly instead of indirectly on $?
Browse files Browse the repository at this point in the history
  • Loading branch information
janosgyerik authored and sns-seb committed Nov 23, 2016
1 parent 7ed6224 commit 6946d77
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6946d77

Please sign in to comment.