X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fscripts%2FInstall-Creatools-Bin.sh;h=9c00c6dea539971fa54e6fd5963c40e9a4dd695d;hb=3b873b40ab4f4cbfd9f951ef93819241d02f97ae;hp=f44dce79aaaac45c943a4e7647b3dc3cdb15694d;hpb=96ba0c7c5b92d1d728f1f786282a198c0d7f001e;p=creaToolsTools.git diff --git a/Linux/scripts/Install-Creatools-Bin.sh b/Linux/scripts/Install-Creatools-Bin.sh index f44dce7..9c00c6d 100755 --- a/Linux/scripts/Install-Creatools-Bin.sh +++ b/Linux/scripts/Install-Creatools-Bin.sh @@ -24,13 +24,37 @@ #!/bin/bash + + +########################################### +function getDistrib { + local OS=`uname` + + 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 +} + +########################################### +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 +} + + 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 -ETC_BASHRC=~/.bashrc -installPrefix=$(pwd)/creatools_install/ -source creatools_install/share/creatools/CreaTools-bashrc.sh +wget http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-BinVersion-`getDistrib`-`getDistribVersion`.sh +source creatools-Linux-BinVersion-`getDistrib`-`getDistribVersion`.sh cd ..