aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanos Gyerik <janos@kronos>2016-11-17 23:39:28 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-11-23 14:17:14 +0100
commit7ed6224f075687ceb6d3aa5a2c531d69fea1fc34 (patch)
tree18b2946d40e02ae0d6c89b79cb66c6c2243feb72
parent78d521cc0a67d0dc406ccd659a86f839042a12b0 (diff)
downloadsonarqube-7ed6224f075687ceb6d3aa5a2c531d69fea1fc34.tar.gz
sonarqube-7ed6224f075687ceb6d3aa5a2c531d69fea1fc34.zip
[script] Redirect output in a simpler and more natural way
-rwxr-xr-xscripts/start.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/start.sh b/scripts/start.sh
index dbf7b49f82b..6f23990f827 100755
--- a/scripts/start.sh
+++ b/scripts/start.sh
@@ -12,7 +12,7 @@ while getopts ":p:" opt; do
p) PATCHES=$OPTARG
;;
\?)
- >&2 echo "Unsupported option $OPTARG"
+ echo "Unsupported option $OPTARG" >&2
exit 1
;;
esac
@@ -24,14 +24,14 @@ else
OS='linux-x86-64'
fi
-ls sonar-application/target/sonarqube-*.zip 1> /dev/null 2>&1
+ls sonar-application/target/sonarqube-*.zip &> /dev/null
if [ "$?" != "0" ]; then
echo 'Sources are not built'
./build.sh
fi
cd sonar-application/target/
-ls sonarqube-*/bin/$OS/sonar.sh 1> /dev/null 2>&1
+ls sonarqube-*/bin/$OS/sonar.sh &> /dev/null
if [ "$?" != "0" ]; then
echo "Unzipping SQ..."
unzip -qq sonarqube-*.zip