]> source.dussan.org Git - sonarqube.git/commitdiff
[script] Redirect output in a simpler and more natural way
authorJanos Gyerik <janos@kronos>
Thu, 17 Nov 2016 22:39:28 +0000 (23:39 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 23 Nov 2016 13:17:14 +0000 (14:17 +0100)
scripts/start.sh

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