]> Creatis software - creaToolsTools.git/commitdiff
#3405 vtk8itk5wx3-macos
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 22 Mar 2022 06:27:34 +0000 (07:27 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 22 Mar 2022 06:27:34 +0000 (07:27 +0100)
Linux/scripts/CreaTools-GenerateBinTGZ.sh
Linux/scripts/Install-Creatools-Bin.sh
Linux/scripts/Install-Creatools-Bin.sh-downloadTool
Linux/scripts/LocalFunctions.sh

index 82097857aadc061b7927492a345fae3de5aff902..737a6da132633d94724d83b353940a8e8fb67742 100644 (file)
        mkdir share
        mkdir share/creatools
        echo "export PATH=\$PATH:\$1/bin" > share/creatools/creatools_TPLaux_config.sh
-       echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$1/lib64" >> share/creatools/creatools_TPLaux_config.sh
+# MacOs
+       if [ `getDistrib` == MacOS ]  ; then 
+               echo "export DYLD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$1/lib64" >> share/creatools/creatools_TPLaux_config.sh
+       else 
+               echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$1/lib64" >> share/creatools/creatools_TPLaux_config.sh
+       fi
+
        cp $scriptDir/TPLaux-bashrc.sh share/creatools/TPLaux-bashrc.sh
 
 # Fedora 31 
 ##     fileTGZf28=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-Fedora-28.tgz
 ##     fileTGZauxf28=$creatoolsTPLaux-Fedora-28.tgz
 
-       fileTGZf28=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-'$'FINALUSER.tgz
+       fileTGZf28=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-'$'VERFINALUSER.tgz
        fileTGZauxf28=$creatoolsTPLaux-'$'VERFINALUSER.tgz
 
 
      echo "ETC_BASHRC=\`getbashrc\`" >>  $filename_BinVersion
 
 
-         echo "if [ \"\$1\" = \"FinalUser\" ] ; then" >> $filename_BinVersion
-         echo "   if [ 'getDistrib' = Fedora ] ; then ">> $filename_BinVersion 
-         echo "     local VERFINALUSER=Fedora-28 ">> $filename_BinVersion 
+         echo "if [ \"\$1\" == \"FinalUser\" ] ; then" >> $filename_BinVersion
+         echo "   if [ \`getDistrib\` == Fedora ] ; then ">> $filename_BinVersion 
+         echo "     VERFINALUSER=Fedora-28 ">> $filename_BinVersion 
          echo "   fi ">> $filename_BinVersion 
-         echo "   if [ 'getDistrib' = MacOS ] ; then ">> $filename_BinVersion 
-         echo "     local VERFINALUSER=MacOS-10.11 ">> $filename_BinVersion 
+         echo "   if [ \`getDistrib\` == MacOS ] ; then ">> $filename_BinVersion 
+         echo "     VERFINALUSER=MacOS-10.11.6 ">> $filename_BinVersion 
          echo "   fi ">> $filename_BinVersion 
-         echo "   \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZf28" >> $filename_BinVersion 
+         echo "   \`getDownloadCommand\` https://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZf28" >> $filename_BinVersion 
          echo "   tar -xvzf $fileTGZf28" >>  $filename_BinVersion
          echo "   rm -f $fileTGZf28" >>  $filename_BinVersion
-         echo "   \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZauxf28" >> $filename_BinVersion 
+         echo "   \`getDownloadCommand\` https://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZauxf28" >> $filename_BinVersion 
          echo "   tar -xvzf $fileTGZauxf28" >>  $filename_BinVersion
          echo "   rm -f $fileTGZauxf28" >>  $filename_BinVersion
       echo "   installPrefixTPLaux=\$(pwd)/creatoolsTPLaux #You need this variable in the -barshrc script" >>  $filename_BinVersion
       echo "   source creatoolsTPLaux/share/creatools/TPLaux-bashrc.sh"  >>  $filename_BinVersion
 
          echo "else" >> $filename_BinVersion
-         echo "   \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZstring.tgz" >> $filename_BinVersion 
+         echo "   \`getDownloadCommand\` https://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZstring.tgz" >> $filename_BinVersion 
          echo "   tar -xvzf $fileTGZstring.tgz" >>  $filename_BinVersion
          echo "   rm -f $fileTGZstring.tgz" >>  $filename_BinVersion
       echo "   OperatingSystem=\`getDistrib\`  #You need this variable in the Base-Stuff script" >>  $filename_BinVersion
index b7fdcb8dff216e0e1ad55cd840083d712549bf3c..b8504cb8f7ab4f777d5aa1a4ba8ad676cc718fb6 100755 (executable)
@@ -10,13 +10,14 @@ else
        rm -rf $CREATOOLSBINDIR
        mkdir $CREATOOLSBINDIR
        cd $CREATOOLSBINDIR
-       $downloadCommand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
+       $downloadCommand https://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
+       chmod u+x creatools-Linux-Bin.sh
        if [ "$1" = "pkg-dev" ]; then
                echo "Installing creaTools pkg-dev ..."
-               source creatools-Linux-Bin.sh
+               ./creatools-Linux-Bin.sh
        elif  [ "$1" = "FinalUser" ]; then
                echo "Installing creaTools FinalUser ..."
-               source creatools-Linux-Bin.sh FinalUser
+               ./creatools-Linux-Bin.sh FinalUser
        else 
                echo "Error.  Input parameter"
        fi
index 368357c5dcf476972489a8762e7ba2c3e0a08a3d..2ba8acad7e62f161f2ce186eddf2e3b12f01ab2a 100755 (executable)
@@ -82,8 +82,8 @@ echo
          downloadCommand=wget 
      ;;
   MacOS)
-     port install curl -y
-         downloadCommand=curl 
+     ## port install curl -y
+     downloadCommand='curl -O ' 
      ;;
   *)
      echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
index b330d317bba8f6360171901f5dd166db456120a8..2973faf63a7fa9e7e08d1c17b39af34728508c80 100644 (file)
@@ -113,7 +113,7 @@ function getKernelVersion {
 function getDownloadCommand {
     local DISTRIB=`getDistrib`
 
-      if [ "$DISTRIB" == MacOS ] ; then downloadCommand=curl;
+      if [ "$DISTRIB" == MacOS ] ; then downloadCommand='curl -O '
     elif [ "$DISTRIB" == Fedora  ] ; then downloadCommand='aria2c -x 16'
     elif [ "$DISTRIB" == CentOs  ] ; then downloadCommand='aria2c -x 16'
     elif [ "$DISTRIB" == Ubuntu  ] ; then downloadCommand=wget