]> Creatis software - creaToolsTools.git/commitdiff
#2493 creaToolsTools Feature New Normal - Prepare and Install binary CreaTools...
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Mon, 9 Feb 2015 15:16:03 +0000 (16:16 +0100)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Mon, 9 Feb 2015 15:16:03 +0000 (16:16 +0100)
Linux/scripts/CreaTools-GenerateBinTGZ.sh
Linux/scripts/Install-Creatools-Bin.sh
Linux/scripts/LocalFunctions.sh

index d39a7185f014909d18a424bb0d8814a8eeab9a31..e8d5d872ef8d358421aca1aaa3b5e89e4c83113e 100644 (file)
@@ -58,7 +58,7 @@ echo $distanceAdress
          cat creatools_install/share/creatools/Version.sh >> $filename_BinVersion
          cat creatools_install/share/creatools/LocalFunctions.sh >> $filename_BinVersion
 
-         echo "aria2c -x 16 http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.\$creatoolsMinorVersion.x/$fileTGZstring.tgz" >> $filename_BinVersion 
+         echo "\`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.\$creatoolsMinorVersion.x/$fileTGZstring.tgz" >> $filename_BinVersion 
          echo "tar -xvzf $fileTGZstring.tgz" >>  $filename_BinVersion
          echo "rm -f $fileTGZstring.tgz" >>  $filename_BinVersion
         
index 6fc6311e489e58531fd128aabed74a6ce2d0240d..7f84f8f36701099f6c89bab39a200eafe487ff97 100755 (executable)
@@ -42,17 +42,21 @@ OperatingSystem=`getDistrib`
   Mandriva)
      echo Root password:
      su -c "urpmi aria2"
+         downloadCpmmand=aria2 
      ;;
   Fedora)
      echo Root password:
      su -c "yum install aria2 -y"
+         downloadCpmmand=aria2 
      ;;
   Ubuntu)
      echo Root password:
-     su -c "apt-get --yes install aria2"
+     su -c "apt-get --yes install wget"
+         downloadCpmmand=wget 
      ;;
   MacOS)
-     port install aria2                -y
+     port install curl -y
+         downloadCpmmand=curl 
      ;;
   *)
      echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
@@ -65,7 +69,7 @@ CREATOOLSBINDIR=Creatools-Bin
 rm -rf $CREATOOLSBINDIR
 mkdir $CREATOOLSBINDIR
 cd $CREATOOLSBINDIR
-aria2c http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
+$downloadCpmmand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
 source creatools-Linux-Bin.sh
 cd ..
 
index c84fca48db57af7d048171f090e27f80b3eff32a..9075cf2673dcec9539944b273c2ac46630bfa0c6 100644 (file)
@@ -82,6 +82,18 @@ function getDistribVersion {
     echo $OSVersion
 }
 
+###########################################
+function getDownloadCommand {
+    local DISTRIB=`getDistrib`
+
+      if [ "$DISTRIB" == MacOS ] ; then downloadCommand=curl;
+    elif [ "$DISTRIB" == Fedora  ] ; then downloadCommand=aria -x 16
+    elif [ "$DISTRIB" == Ubuntu  ] ; then downloadCommand=wget
+    else downloadCommand="VOID_EED"
+    fi
+    echo $downloadCommand
+}
+
 ###########################################
 function getncore {
     if [ `uname` == Darwin ] ; then # MacOS
@@ -113,6 +125,7 @@ function getbashrc {
 #    fi
 }
 
+
 ###########################################
 function printconfig {
     echo