]> Creatis software - creaToolsTools.git/commitdiff
#2493 creaToolsTools Feature New Normal - Prepare and Install binary CreaTools...
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Thu, 8 Jan 2015 14:12:18 +0000 (15:12 +0100)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Thu, 8 Jan 2015 14:12:18 +0000 (15:12 +0100)
Linux/installscript
Linux/scripts/CreaTools-GenerateBinTGZ.sh
Linux/scripts/Install-Creatools-Bin.sh
Linux/scripts/LocalFunctions.sh

index 5f49a6bb0bbe63159feef4257ea3c99c0e4cb6a6..3a754ee0cdcd53b07a6f9a92b8d80ee91c23e58d 100755 (executable)
@@ -153,7 +153,7 @@ if [ `checkVal $command config all` == false ] ; then
         exit
     fi
     source $configureFile
-    if [ ! -f $installPrefixThird/share/creatools_third_party_library_config.sh ] ; then
+    if [ ! -f $installPrefixThird/share/creatools/creatools_third_party_library_config.sh ] ; then
         echo WARNING
         echo "the curently used Third Party libraries are NOT in $installPrefixThird but ... in :"
         grep "installPrefixThird=" $ETC_BASHRC
index eb101adda40c53d99e50de8fb5e0a0b9a38b1edc..80760b839bcb0a9d8174186bfce4aab3bab2fbc3 100644 (file)
@@ -21,7 +21,6 @@
 #  knowledge of the CeCILL-B license and that you accept its terms.
 # ------------------------------------------------------------------------  
 
-
 #!/bin/bash
 
 # JPR 2/5/2011
          source creatools_install/share/creatools/Version.sh 
      fileTGZ=CreaTools-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-`getDistrib`-`getDistribVersion`.tgz
 
-     tar -cvzf $fileTGZ creatools_install thirdparty_install
-
-         scp $fileTGZ tux.creatis.insa-lyon.fr:creatools/creaTools/v$creatoolsMajorVersion.$creatoolsMinorVersion.x/$fileTGZ 
-
-         echo "##" > creatools-Linux-BinVersion.sh
-         echo "## Generated by CreaTools-GeneratedBinTGZ.sh" >> creatools-Linux-BinVersion.sh
-         echo "##" >> creatools-Linux-BinVersion.sh
-
-         echo "wget http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v$creatoolsMajorVersion.$creatoolsMinorVersion.x/$fileTGZ" >> creatools-Linux-BinVersion.sh 
-         echo "tar -xvzf $fileTGZ" >>  creatools-Linux-BinVersion.sh
-
-
-     echo "source creatools_install/share/creatools/LocalFunctions.sh"  >>  creatools-Linux-BinVersion.sh
-     echo "ETC_BASHRC=\`getbashrc\`" >>  creatools-Linux-BinVersion.sh
-     echo "installPrefix=\$(pwd)/creatools_install #You need this variable in the -barshrc script" >>  creatools-Linux-BinVersion.sh
-     echo "installPrefixThird=\$(pwd)/thirdparty_install #You need this variable in the -barshrc script" >>  creatools-Linux-BinVersion.sh
-     echo "OperatingSystem=\`getDistrib\`  #You need this variable in the Base-Stuff script" >>  creatools-Linux-BinVersion.sh
-
-
-     echo "cd thirdparty_install/share/creatools/"  >>  creatools-Linux-BinVersion.sh
-     echo "source ThirdParty-install-Base-Stuff.sh $OperatingSystem"  >>  creatools-Linux-BinVersion.sh
-     echo "cd ../../.."  >>  creatools-Linux-BinVersion.sh
-     echo "source thirdparty_install/share/creatools/ThirdParty-bashrc.sh"  >>  creatools-Linux-BinVersion.sh
-     echo "source creatools_install/share/creatools/CreaTools-bashrc.sh"  >>  creatools-Linux-BinVersion.sh
-     echo "echo  " >>  creatools-Linux-BinVersion.sh
-     echo "echo  " >>  creatools-Linux-BinVersion.sh
-     echo "echo  " >>  creatools-Linux-BinVersion.sh
-     echo "echo  " >>  creatools-Linux-BinVersion.sh
-     echo "echo 'Open a new terminal to run creatools.'" >>  creatools-Linux-BinVersion.sh
-     echo "echo '(Close this window and continue....)' " >>  creatools-Linux-BinVersion.sh
-     echo "echo  " >>  creatools-Linux-BinVersion.sh
-     echo "echo  " >>  creatools-Linux-BinVersion.sh
-     echo "read -p 'Press [Enter] key to continue...'" >>  creatools-Linux-BinVersion.sh
-
-
-     scp creatools-Linux-BinVersion.sh tux.creatis.insa-lyon.fr:creatools/creaTools/. 
+##EED     tar -cvzf $fileTGZ creatools_install thirdparty_install
+##EED    scp $fileTGZ tux.creatis.insa-lyon.fr:creatools/creaTools/v$creatoolsMajorVersion.$creatoolsMinorVersion.x/$fileTGZ 
+
+         filename_BinVersion=creatools-Linux-BinVersion-`getDistrib`-`getDistribVersion`.sh
+
+         echo "##" > $filename_BinVersion
+         echo "## Generated by CreaTools-GeneratedBinTGZ.sh" >> $filename_BinVersion
+         echo "##" >> $filename_BinVersion
+
+         echo "wget http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v$creatoolsMajorVersion.$creatoolsMinorVersion.x/$fileTGZ" >> $filename_BinVersion 
+         echo "tar -xvzf $fileTGZ" >>  $filename_BinVersion
+
+     echo "source creatools_install/share/creatools/LocalFunctions.sh"  >>  $filename_BinVersion
+     echo "ETC_BASHRC=\`getbashrc\`" >>  $filename_BinVersion
+     echo "installPrefix=\$(pwd)/creatools_install #You need this variable in the -barshrc script" >>  $filename_BinVersion
+     echo "installPrefixThird=\$(pwd)/thirdparty_install #You need this variable in the -barshrc script" >>  $filename_BinVersion
+     echo "OperatingSystem=\`getDistrib\`  #You need this variable in the Base-Stuff script" >>  $filename_BinVersion
+
+     echo "cd thirdparty_install/share/creatools/"  >>  $filename_BinVersion
+     echo "source ThirdParty-install-Base-Stuff.sh $OperatingSystem"  >>  $filename_BinVersion
+     echo "cd ../../.."  >>  $filename_BinVersion
+     echo "source thirdparty_install/share/creatools/ThirdParty-bashrc.sh"  >>  $filename_BinVersion
+     echo "source creatools_install/share/creatools/CreaTools-bashrc.sh"  >>  $filename_BinVersion
+     echo "echo  " >>  $filename_BinVersion
+     echo "echo  " >>  $filename_BinVersion
+     echo "echo  " >>  $filename_BinVersion
+     echo "echo  " >>  $filename_BinVersion
+     echo "echo 'Open a new terminal to run creatools.'" >>  $filename_BinVersion
+     echo "echo '(Close this window and continue....)' " >>  $filename_BinVersion
+     echo "echo  " >>  $filename_BinVersion
+     echo "echo  " >>  $filename_BinVersion
+     echo "read -p 'Press [Enter] key to continue...'" >>  $filename_BinVersion
+     scp $filename_BinVersion tux.creatis.insa-lyon.fr:creatools/creaTools/. 
 
      echo ""
      echo ""
index 38040b1827f0439b5b486e7d4fe46ce33dd301d6..9c00c6dea539971fa54e6fd5963c40e9a4dd695d 100755 (executable)
 
 #!/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-Linux-BinVersion.sh
-source creatools-Linux-BinVersion.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 ..
 
index 8d61359c787e51e9312fb08b7b81097d28331aac..c84fca48db57af7d048171f090e27f80b3eff32a 100644 (file)
@@ -72,10 +72,11 @@ function getDistrib {
 
 ###########################################
 function getDistribVersion {
-    local OS=`uname`
+    local DISTRIB=`getDistrib`
 
-      if [ "$OS" == Darwin ] ; then OSVesion=VOID_Darwin_EED;
-    elif [ "$OS" == Linux  ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/issue`
+      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