X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fscripts%2FInstall-Creatools-Bin.sh;h=da113ec0cb67909509cf24774d252377feb780f8;hb=d3e87a40687b7ba7a7418af86aca1666fb4a7d2c;hp=cc87b37846bbce20c836328839cb8783d7698ca1;hpb=be3ecca8f693fc77904d72ffd79533262a78cd51;p=creaToolsTools.git diff --git a/Linux/scripts/Install-Creatools-Bin.sh b/Linux/scripts/Install-Creatools-Bin.sh index cc87b37..da113ec 100755 --- a/Linux/scripts/Install-Creatools-Bin.sh +++ b/Linux/scripts/Install-Creatools-Bin.sh @@ -21,21 +21,56 @@ # 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-DownloadLastVersion.sh -source creatools-DownloadLastVersion.sh + if [ "$OS" == Darwin ] ; then OS=MacOS; + elif [ "$OS" == Linux ] ; then OS=`awk 'NR==1{print $1}' /etc/issue` + else OS="" + fi +# checkDistrib $OS + echo $OS +} -ETC_BASHRC=~/.bashrc -installPrefix=$(pwd)/creatools_install -installPrefixThird=$(pwd)/thirdparty_install -source thirdparty_install/share/creatools/ThirdParty-bashrc.sh -source creatools_install/share/creatools/CreaTools-bashrc.sh +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 .. +