From 351c4ef4a989bb89a6d541864bbd3935c5d171f4 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Tue, 22 Mar 2022 07:27:34 +0100 Subject: [PATCH] #3405 vtk8itk5wx3-macos --- Linux/scripts/CreaTools-GenerateBinTGZ.sh | 26 ++++++++++++------- Linux/scripts/Install-Creatools-Bin.sh | 7 ++--- .../Install-Creatools-Bin.sh-downloadTool | 4 +-- Linux/scripts/LocalFunctions.sh | 2 +- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/Linux/scripts/CreaTools-GenerateBinTGZ.sh b/Linux/scripts/CreaTools-GenerateBinTGZ.sh index 8209785..737a6da 100644 --- a/Linux/scripts/CreaTools-GenerateBinTGZ.sh +++ b/Linux/scripts/CreaTools-GenerateBinTGZ.sh @@ -71,7 +71,13 @@ 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 @@ -160,7 +166,7 @@ ## 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 @@ -180,24 +186,24 @@ 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 diff --git a/Linux/scripts/Install-Creatools-Bin.sh b/Linux/scripts/Install-Creatools-Bin.sh index b7fdcb8..b8504cb 100755 --- a/Linux/scripts/Install-Creatools-Bin.sh +++ b/Linux/scripts/Install-Creatools-Bin.sh @@ -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 diff --git a/Linux/scripts/Install-Creatools-Bin.sh-downloadTool b/Linux/scripts/Install-Creatools-Bin.sh-downloadTool index 368357c..2ba8aca 100755 --- a/Linux/scripts/Install-Creatools-Bin.sh-downloadTool +++ b/Linux/scripts/Install-Creatools-Bin.sh-downloadTool @@ -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 " diff --git a/Linux/scripts/LocalFunctions.sh b/Linux/scripts/LocalFunctions.sh index b330d31..2973faf 100644 --- a/Linux/scripts/LocalFunctions.sh +++ b/Linux/scripts/LocalFunctions.sh @@ -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 -- 2.47.1