]> Creatis software - creaToolsTools.git/blobdiff - Linux/scripts/Install-Creatools-Bin.sh
#2493 creaToolsTools Feature New Normal - Prepare and Install binary CreaTools...
[creaToolsTools.git] / Linux / scripts / Install-Creatools-Bin.sh
index e5698e6a7fb91f512d3dee88d5991119ed6b637f..8d9e4eed4190d909d7d9d8fbb965a752d9b77092 100755 (executable)
 
 #!/bin/bash
 
-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
-installPrefixThird=$(pwd)/thirdparty_install
-OperatingSystem=`getDistrib`
 
-source thirdparty_install/share/creatools/ThirdParty-install-Base-Stuff.sh $OperatingSystem
-source thirdparty_install/share/creatools/ThirdParty-bashrc.sh
-source creatools_install/share/creatools/CreaTools-bashrc.sh
+###########################################
+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
+}
+
+CREATOOLSBINDIR=Creatools-Bin-`getDistrib`-`getDistribVersion`
+
+rm -rf $CREATOOLSBINDIR
+mkdir $CREATOOLSBINDIR
+cd $CREATOOLSBINDIR
+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 ..
 
+
+