]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix bash script stylistic issues 5947/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 22 Feb 2018 20:10:56 +0000 (15:10 -0500)
committerTimo Heister <timo.heister@gmail.com>
Thu, 22 Feb 2018 20:10:56 +0000 (15:10 -0500)
using shellcheck

contrib/utilities/setup_astyle.sh

index 4f0f53dc70ff5e387f92a3736fb176018e263eed..fdb23e6628e5180e324a202ad9b738932b0970cc 100755 (executable)
@@ -2,19 +2,19 @@
 
 PRG=$PWD/programs
 
-if [ ! -d $PRG ] 
+if [ ! -d "$PRG" ]
 then
-    echo "create folder `$PRG`"
-    mkdir $PRG
+    echo "create folder $PRG"
+    mkdir "$PRG"
 fi
 
 # astyle
-if [ ! -d $PRG/astyle ]
+if [ ! -d "$PRG/astyle" ]
 then
     echo "Downloading and installing astyle."
-    mkdir $PRG/astyle
+    mkdir "$PRG/astyle"
     wget http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz  > /dev/null
-    tar xfz astyle_2.04_linux.tar.gz -C $PRG > /dev/null
-    cd $PRG/astyle/build/gcc
+    tar xfz astyle_2.04_linux.tar.gz -C "$PRG" > /dev/null
+    cd "$PRG/astyle/build/gcc"
     make -j4 > /dev/null
 fi

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.