From fd2aac7e56a2ae4ecd5ed98deec488f6dbbedc1b Mon Sep 17 00:00:00 2001 From: davila Date: Fri, 26 Dec 2014 08:10:15 +0100 Subject: [PATCH] #2493 creaToolsTools Feature New Normal - Prepare and Install binary CreaTools version - Linux --- Linux/README.txt | 2 +- Linux/installscript | 6 +++-- Linux/scripts/CreaTools-compile.sh | 2 +- Linux/scripts/CreaTools-install.sh | 6 ++--- Linux/scripts/CreaTools-load.sh | 10 ++++----- .../scripts/ThirdParty-install-Base-Stuff.sh | 20 ++++++++--------- Linux/scripts/ThirdParty-install-Finalize.sh | 2 +- Linux/scripts/ThirdParty-install-ITK.sh | 22 +++++++++---------- Linux/scripts/ThirdParty-install-VTK.sh | 22 +++++++++---------- Linux/scripts/ThirdParty-install-WX.sh | 22 +++++++++---------- Linux/scripts/ThirdParty-install-gdcm.sh | 22 +++++++++---------- Linux/scripts/ThirdParty-install.sh | 20 ++++++++--------- .../scripts/ThirdParty-install_no_compile.sh | 2 +- Linux/scripts/cmakemod.sh | 2 +- 14 files changed, 81 insertions(+), 79 deletions(-) diff --git a/Linux/README.txt b/Linux/README.txt index ae2743f..f89ed0c 100644 --- a/Linux/README.txt +++ b/Linux/README.txt @@ -67,7 +67,7 @@ Exemples of differents configurations : ===== How to Install - HTML VERSION ======= 1) -./installscript -os Fedora -ncore 8 -gdir $HOME/Creatis/creaTools -instprefix $HOME/Creatis/creaTools/creatools_install -instprefix3 $HOME/Creatis/creaTools/thirdparty_install -build Release config +./installscript -os Fedora -ncore 8 -gdir $HOME/Creatis/creaTools -instprefix $HOME/Creatis/creaTools/creatools_install -instprefix3 $HOME/Creatis/creaTools/thirdparty_install -html -build Release config 2) As root ./installscript 3rd diff --git a/Linux/installscript b/Linux/installscript index 851dce2..7c6530a 100755 --- a/Linux/installscript +++ b/Linux/installscript @@ -145,7 +145,7 @@ configureFile="scripts/CreaTools-configure.sh" # default configuration parameters OperatingSystem=`getDistrib` corenumber=`getncore` -generationdir=$HOME/CreatoolsGenerationDir +generationdir=$HOME/Creatis/creaTools installPrefixThird= installPrefix= docgeneration=OFF @@ -175,7 +175,7 @@ function usage { echo " as a normal user:" echo " config : set the configuration parameters only" echo " " - echo " as root:" + echo " need root password:" echo " 3rd : Get, Compile, Install all 3rd party library " echo " 3rd-base : Install basic tools (cmake, doxygen...)" echo " 3rd-vtk : Get, Compile, Install vtk" @@ -207,6 +207,7 @@ function usage { echo " -gdir : generation directory (default $generationdir)" echo " -instprefix : creatools install prefix" echo " -instprefix3 : 3rd party library install prefix" + echo " -html : get creatools from HTML" echo " -git : get creatools from git (CREATIS user only)" echo " -git-read-only : get creatools from git (anonymously, no write access)" echo " -build : build type Release, RelWithDebug or Debug (default RelWithDebug)" @@ -229,6 +230,7 @@ while [ $# -ge 1 ] ; do -instprefix) installPrefix=$2; shift 2;; -instprefix3) installPrefixThird=$2; shift 2;; -doc) docgeneration=ON; shift 1;; + -html) sourcesFrom=HTML; shift 1;; -git) sourcesFrom=GIT; shift 1;; -git-read-only) sourcesFrom=GIT-READ-ONLY; shift 1;; diff --git a/Linux/scripts/CreaTools-compile.sh b/Linux/scripts/CreaTools-compile.sh index 72b7311..58f3827 100644 --- a/Linux/scripts/CreaTools-compile.sh +++ b/Linux/scripts/CreaTools-compile.sh @@ -121,7 +121,7 @@ fi then rm -rf creatools_bin fi - mkdir creatools_bin + mkdir -p creatools_bin cd $scriptDir diff --git a/Linux/scripts/CreaTools-install.sh b/Linux/scripts/CreaTools-install.sh index d20555c..cb415f2 100644 --- a/Linux/scripts/CreaTools-install.sh +++ b/Linux/scripts/CreaTools-install.sh @@ -35,7 +35,7 @@ then if [ ! -e $generationdir/creatools_install ] then - mkdir $generationdir/creatools_install + mkdir -p $generationdir/creatools_install fi else echo @@ -69,8 +69,8 @@ sed -i -e '/.*creatools_base_library_config.*/ d' $ETC_BASHRC sed -i -e '/installPrefixtmp*/ d' $ETC_BASHRC - mkdir $installPrefix - mkdir $installPrefix/share + mkdir -p $installPrefix + mkdir -p $installPrefix/share echo '## This file is call from .bashrc' > $installPrefix/share/creatools_base_library_config.sh bash installmodBash.sh $installPrefix diff --git a/Linux/scripts/CreaTools-load.sh b/Linux/scripts/CreaTools-load.sh index b8b983b..08112a8 100644 --- a/Linux/scripts/CreaTools-load.sh +++ b/Linux/scripts/CreaTools-load.sh @@ -69,10 +69,10 @@ fi if [ ! -e $generationdir ] then - mkdir $generationdir - mkdir $generationdir/creatools_source - mkdir $generationdir/creatools_bin - mkdir $generationdir/creatools_install + mkdir -p $generationdir + mkdir -p $generationdir/creatools_source + mkdir -p $generationdir/creatools_bin + mkdir -p $generationdir/creatools_install fi cd $generationdir @@ -89,7 +89,7 @@ then rm -rf creatools_source rm -rf creatools_bin rm -rf creatools_install - mkdir $generationdir/creatools_source + mkdir -p $generationdir/creatools_source fi fi diff --git a/Linux/scripts/ThirdParty-install-Base-Stuff.sh b/Linux/scripts/ThirdParty-install-Base-Stuff.sh index ea2c386..a548be6 100644 --- a/Linux/scripts/ThirdParty-install-Base-Stuff.sh +++ b/Linux/scripts/ThirdParty-install-Base-Stuff.sh @@ -46,25 +46,25 @@ binDir=$generationdir/thirdparty_bin if [ ! -e $generationdir ] then - mkdir $generationdir - chown $loginUserName $generationdir - chgrp $loginGroupName $generationdir + mkdir -p $generationdir + chown -R $loginUserName $generationdir + chgrp -R $loginGroupName $generationdir fi if [ ! -e $sourcesDir ] then - mkdir $sourcesDir + mkdir -p $sourcesDir #was : (pb on MacOS?) - #chown $loginUserName:$loginGroupName $sourcesDir - chown $loginUserName $sourcesDir - chgrp $loginGroupName $sourcesDir + #chown -R $loginUserName:$loginGroupName $sourcesDir + chown -R $loginUserName $sourcesDir + chgrp -R $loginGroupName $sourcesDir fi if [ ! -e $binDir ] then - mkdir $binDir - chown $loginUserName $binDir - chgrp $loginGroupName $binDir + mkdir -p $binDir + chown -R $loginUserName $binDir + chgrp -R $loginGroupName $binDir fi # the following stupid test is used at debug time; Please don't remove! diff --git a/Linux/scripts/ThirdParty-install-Finalize.sh b/Linux/scripts/ThirdParty-install-Finalize.sh index 9ac09af..e5c752e 100644 --- a/Linux/scripts/ThirdParty-install-Finalize.sh +++ b/Linux/scripts/ThirdParty-install-Finalize.sh @@ -57,7 +57,7 @@ fi if [ ! -e $installPrefixThird/share ] then - mkdir $installPrefixThird/share + mkdir -p $installPrefixThird/share fi touch $installPrefixThird/share/creatools_third_party_library_config.sh chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh diff --git a/Linux/scripts/ThirdParty-install-ITK.sh b/Linux/scripts/ThirdParty-install-ITK.sh index 2d5a71a..89b2ac9 100644 --- a/Linux/scripts/ThirdParty-install-ITK.sh +++ b/Linux/scripts/ThirdParty-install-ITK.sh @@ -76,25 +76,25 @@ binDir=$generationdir/thirdparty_bin if [ ! -e $generationdir ] then - mkdir $generationdir - chown $loginUserName $generationdir - chgrp $loginGroupName $generationdir + mkdir -p $generationdir + chown -R $loginUserName $generationdir + chgrp -R $loginGroupName $generationdir fi if [ ! -e $sourcesDir ] then - mkdir $sourcesDir + mkdir -p $sourcesDir #was : (pb on MacOS?) - #chown $loginUserName:$loginGroupName $sourcesDir - chown $loginUserName $sourcesDir - chgrp $loginGroupName $sourcesDir + #chown -R $loginUserName:$loginGroupName $sourcesDir + chown -R $loginUserName $sourcesDir + chgrp -R $loginGroupName $sourcesDir fi if [ ! -e $binDir ] then - mkdir $binDir - chown $loginUserName $binDir - chgrp $loginGroupName $binDir + mkdir -p $binDir + chown -R $loginUserName $binDir + chgrp -R $loginGroupName $binDir fi echo "we remove old stuff" @@ -147,7 +147,7 @@ then dirInstall=$binDir/$libname-Bin export ITK_DIR=$installPrefixThird/lib/InsightToolkit/ - mkdir $dirInstall + mkdir -p $dirInstall cd $dirInstall cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/ diff --git a/Linux/scripts/ThirdParty-install-VTK.sh b/Linux/scripts/ThirdParty-install-VTK.sh index 8062966..cc1f017 100644 --- a/Linux/scripts/ThirdParty-install-VTK.sh +++ b/Linux/scripts/ThirdParty-install-VTK.sh @@ -70,25 +70,25 @@ binDir=$generationdir/thirdparty_bin if [ ! -e $generationdir ] then - mkdir $generationdir - chown $loginUserName $generationdir - chgrp $loginGroupName $generationdir + mkdir -p $generationdir + chown -R $loginUserName $generationdir + chgrp -R $loginGroupName $generationdir fi if [ ! -e $sourcesDir ] then - mkdir $sourcesDir + mkdir -p $sourcesDir #was : (pb on MacOS?) - #chown $loginUserName:$loginGroupName $sourcesDir - chown $loginUserName $sourcesDir - chgrp $loginGroupName $sourcesDir + #chown -R $loginUserName:$loginGroupName $sourcesDir + chown -R $loginUserName $sourcesDir + chgrp -R $loginGroupName $sourcesDir fi if [ ! -e $binDir ] then - mkdir $binDir - chown $loginUserName $binDir - chgrp $loginGroupName $binDir + mkdir -p $binDir + chown -R $loginUserName $binDir + chgrp -R $loginGroupName $binDir fi echo "we remove old stuff" @@ -148,7 +148,7 @@ then ## export VTK_DIR=$installPrefixThird/lib/vtk-5.6/ export VTK_DIR=$installPrefixThird/lib/vtk-5.10/ - mkdir $dirInstall + mkdir -p $dirInstall echo "we prepare directories dirInstall " $dirInstall " VTK_DIR " $installPrefixThird/lib/vtk-5.10.1/ cd $dirInstall diff --git a/Linux/scripts/ThirdParty-install-WX.sh b/Linux/scripts/ThirdParty-install-WX.sh index 90c4b04..6164821 100644 --- a/Linux/scripts/ThirdParty-install-WX.sh +++ b/Linux/scripts/ThirdParty-install-WX.sh @@ -70,25 +70,25 @@ binDir=$generationdir/thirdparty_bin if [ ! -e $generationdir ] then - mkdir $generationdir - chown $loginUserName $generationdir - chgrp $loginGroupName $generationdir + mkdir -p $generationdir + chown -R $loginUserName $generationdir + chgrp -R $loginGroupName $generationdir fi if [ ! -e $sourcesDir ] then - mkdir $sourcesDir + mkdir -p $sourcesDir #was : (pb on MacOS?) - #chown $loginUserName:$loginGroupName $sourcesDir - chown $loginUserName $sourcesDir - chgrp $loginGroupName $sourcesDir + #chown -R $loginUserName:$loginGroupName $sourcesDir + chown -R $loginUserName $sourcesDir + chgrp -R $loginGroupName $sourcesDir fi if [ ! -e $binDir ] then - mkdir $binDir - chown $loginUserName $binDir - chgrp $loginGroupName $binDir + mkdir -p $binDir + chown -R $loginUserName $binDir + chgrp -R $loginGroupName $binDir fi echo "we remove old stuff" @@ -120,7 +120,7 @@ then libname=wxWidgets dirInstall=$installPrefixThird/lib/wx/ export WX_DIR=$installPrefixThird/lib/wx/ - mkdir $dirInstall + mkdir -p $dirInstall echo "we prepare directories dirInstall " $dirInstall " wx_DIR " $installPrefixThird/lib/wx/ #cd $dirInstall diff --git a/Linux/scripts/ThirdParty-install-gdcm.sh b/Linux/scripts/ThirdParty-install-gdcm.sh index 18771ac..d89acab 100644 --- a/Linux/scripts/ThirdParty-install-gdcm.sh +++ b/Linux/scripts/ThirdParty-install-gdcm.sh @@ -69,25 +69,25 @@ binDir=$generationdir/thirdparty_bin if [ ! -e $generationdir ] then - mkdir $generationdir - chown $loginUserName $generationdir - chgrp $loginGroupName $generationdir + mkdir -p $generationdir + chown -R $loginUserName $generationdir + chgrp -R $loginGroupName $generationdir fi if [ ! -e $sourcesDir ] then - mkdir $sourcesDir + mkdir -p $sourcesDir #was : (pb on MacOS?) - #chown $loginUserName:$loginGroupName $sourcesDir - chown $loginUserName $sourcesDir - chgrp $loginGroupName $sourcesDir + #chown -R $loginUserName:$loginGroupName $sourcesDir + chown -R $loginUserName $sourcesDir + chgrp -R $loginGroupName $sourcesDir fi if [ ! -e $binDir ] then - mkdir $binDir - chown $loginUserName $binDir - chgrp $loginGroupName $binDir + mkdir -p $binDir + chown -R $loginUserName $binDir + chgrp -R $loginGroupName $binDir fi echo "we remove old stuff" @@ -121,7 +121,7 @@ then libname=gdcm dirInstall=$binDir/$libname-Bin export GDCM_DIR=$installPrefixThird/lib/gdcm/ - mkdir $dirInstall + mkdir -p $dirInstall cd $dirInstall cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/ diff --git a/Linux/scripts/ThirdParty-install.sh b/Linux/scripts/ThirdParty-install.sh index 059f2ae..a3ffec9 100644 --- a/Linux/scripts/ThirdParty-install.sh +++ b/Linux/scripts/ThirdParty-install.sh @@ -73,25 +73,25 @@ binDir=$generationdir/thirdparty_bin if [ ! -e $generationdir ] then - mkdir $generationdir - chown $loginUserName $generationdir - chgrp $loginGroupName $generationdir + mkdir -p $generationdir + chown -R $loginUserName $generationdir + chgrp -R $loginGroupName $generationdir fi if [ ! -e $sourcesDir ] then - mkdir $sourcesDir + mkdir -p $sourcesDir #was : (pb on MacOS?) - #chown $loginUserName:$loginGroupName $sourcesDir - chown $loginUserName $sourcesDir - chgrp $loginGroupName $sourcesDir + #chown -R $loginUserName:$loginGroupName $sourcesDir + chown -R $loginUserName $sourcesDir + chgrp -R $loginGroupName $sourcesDir fi if [ ! -e $binDir ] then - mkdir $binDir - chown $loginUserName $binDir - chgrp $loginGroupName $binDir + mkdir -p $binDir + chown -R $loginUserName $binDir + chgrp -R $loginGroupName $binDir fi diff --git a/Linux/scripts/ThirdParty-install_no_compile.sh b/Linux/scripts/ThirdParty-install_no_compile.sh index d16b103..67e0fb7 100644 --- a/Linux/scripts/ThirdParty-install_no_compile.sh +++ b/Linux/scripts/ThirdParty-install_no_compile.sh @@ -77,7 +77,7 @@ fi if [ ! -e $installPrefixThird/share ] then - mkdir $installPrefixThird/share + mkdir -p $installPrefixThird/share fi touch $installPrefixThird/share/creatools_third_party_library_config.sh chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh diff --git a/Linux/scripts/cmakemod.sh b/Linux/scripts/cmakemod.sh index fabcc09..a744f4e 100644 --- a/Linux/scripts/cmakemod.sh +++ b/Linux/scripts/cmakemod.sh @@ -54,7 +54,7 @@ fi echo dirInstall echo $dirInstall -mkdir $dirInstall +mkdir -p $dirInstall cd $dirInstall echo -H$currentdir/creatools_source/$1 echo -B$dirInstall/ -- 2.47.1