X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fscripts%2FInstall-Creatools-Bin.sh;h=f50fe366b9c231de585b55ad947c26729b5d264d;hb=8b92b274af03229d9774f6bbfabc3824c2f29928;hp=38040b1827f0439b5b486e7d4fe46ce33dd301d6;hpb=8987c596864a8a2fd7786e6aea59cdd03904ae14;p=creaToolsTools.git diff --git a/Linux/scripts/Install-Creatools-Bin.sh b/Linux/scripts/Install-Creatools-Bin.sh index 38040b1..f50fe36 100755 --- a/Linux/scripts/Install-Creatools-Bin.sh +++ b/Linux/scripts/Install-Creatools-Bin.sh @@ -21,13 +21,59 @@ # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ +#!/bin/bash -e -#!/bin/bash +########################################### +function getDistrib { + local OS=`uname` -rm -rf Creatools -mkdir Creatools -cd Creatools -wget http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-BinVersion.sh -source creatools-Linux-BinVersion.sh + if [ "$OS" == Darwin ] ; then OS=MacOS; +##EED2016-10-15 +## elif [ "$OS" == Linux ] ; then OS=`awk 'NR==1{print $1}' /etc/system-release` + elif [ "$OS" == Linux ] ; then OS=$(lsb_release -i | awk '{print $3}') + + else OS="" + fi +# checkDistrib $OS + echo $OS +} + + +OperatingSystem=`getDistrib` + + case "$OperatingSystem" in + Mandriva) + echo Root password: + su -c "urpmi aria2" + downloadCommand=aria2c + ;; + Fedora) + echo Root password: + su -c "yum install aria2 -y" + downloadCommand=aria2c + ;; + Ubuntu) + echo Root password: + su -c "apt-get --yes install wget" + downloadCommand=wget + ;; + MacOS) + port install curl -y + downloadCommand=curl + ;; + *) + echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem " + echo " Allowed values are (right now) Fedora, Ubuntu, MacOS " +// exit 0 + ;; + esac + +CREATOOLSBINDIR=Creatools-Bin +rm -rf $CREATOOLSBINDIR +mkdir $CREATOOLSBINDIR +cd $CREATOOLSBINDIR +$downloadCommand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh +source creatools-Linux-Bin.sh cd .. +