X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fscripts%2FInstall-Creatools-Bin.sh;h=7f84f8f36701099f6c89bab39a200eafe487ff97;hb=226677f5b7419d7bfdf7914b338af561d675605d;hp=9c00c6dea539971fa54e6fd5963c40e9a4dd695d;hpb=3b873b40ab4f4cbfd9f951ef93819241d02f97ae;p=creaToolsTools.git diff --git a/Linux/scripts/Install-Creatools-Bin.sh b/Linux/scripts/Install-Creatools-Bin.sh index 9c00c6d..7f84f8f 100755 --- a/Linux/scripts/Install-Creatools-Bin.sh +++ b/Linux/scripts/Install-Creatools-Bin.sh @@ -21,10 +21,7 @@ # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ - -#!/bin/bash - - +#!/bin/bash -e ########################################### function getDistrib { @@ -38,23 +35,42 @@ function getDistrib { echo $OS } -########################################### -function getDistribVersion { - local DISTRIB=`getDistrib` - if [ "$DISTRIB" == MacOS ] ; then OSVesion=VOID_Darwin_EED; - elif [ "$DISTRIB" == Fedora ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/issue` - elif [ "$DISTRIB" == Ubuntu ] ; then OSVersion=`awk 'NR==1{print $2}' /etc/issue` - else OSVersion="VOID_EED" - fi - echo $OSVersion -} +OperatingSystem=`getDistrib` + case "$OperatingSystem" in + 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 wget" + downloadCpmmand=wget + ;; + MacOS) + port install curl -y + downloadCpmmand=curl + ;; + *) + echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem " + echo " Allowed values are (right now) Fedora, Ubuntu, MacOS " +// exit 0 + ;; + esac -rm -rf Creatools -mkdir Creatools -cd Creatools -wget http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-BinVersion-`getDistrib`-`getDistribVersion`.sh -source creatools-Linux-BinVersion-`getDistrib`-`getDistribVersion`.sh +CREATOOLSBINDIR=Creatools-Bin +rm -rf $CREATOOLSBINDIR +mkdir $CREATOOLSBINDIR +cd $CREATOOLSBINDIR +$downloadCpmmand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh +source creatools-Linux-Bin.sh cd .. +