]> SALOME platform Git repositories - tools/install.git/blob - config_files/HXX2SALOMEDOC.sh
Salome HOME
Remove commented code.
[tools/install.git] / config_files / HXX2SALOMEDOC.sh
1 #!/bin/bash -noprofile
2
3 ####################################################################################
4 #  File      : HXX2SALOMEDOC.sh
5 #  Created   : Thu Dec 18 12:01:00 2002
6 #  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
7 #  Project   : SALOME
8 #  Module    : Installation Wizard
9 #  Copyright : 2002-2007 CEA
10 #
11 #  This script is the part of the SALOME installation procedure.
12 #
13 ####################################################################################
14
15 VERSION="3.2.7"
16
17 check_version(){
18 # No way to check version!
19 return 0
20 }
21
22 print_env_bin(){
23 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
24 #$DELIM ${PRODUCT_TYPE} $DELIM
25 #nothing to do
26 ##
27 EOF
28 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
29 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
30 }
31
32 print_env_src()
33 {
34 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
35 #$DELIM ${PRODUCT_TYPE}_src $DELIM
36 # nothing to do
37 ##
38 EOF
39 (test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
40 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
41 }
42
43 try_preinstalled(){
44 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
45 try_existing ${PRODUCT_SRC_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
46 return $?
47 }
48
49 install_source(){
50 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
51 source ${INSTALL_WORK}/$SHRC
52 # unpack
53 check_jb tar xfz ${SOURCE_DIR}/HXX2SALOMEDOCsourcesV${VERSION}.tar.gz -C ${INSTALL_ROOT}
54
55 # to generate environment scripts
56 try_preinstalled
57 }
58
59 install_source_and_build()
60 {
61 # install sources
62 install_source
63
64 # remove sources and temporary files after building
65 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
66     test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
67 fi
68
69 # to generate environment scripts
70 try_preinstalled
71 }
72
73 install_binary(){
74 echo "It's impossible to install ${PRODUCT} from binaries"
75
76 # to generate environment scripts
77 try_preinstalled
78
79 return 1
80 }
81
82 export PROCEDURE=$1;
83 export INSTALL_WORK=$2;
84 export SOURCE_DIR=$3;
85 export INSTALL_ROOT=$4;
86 export PRODUCT_SEQUENCE=$5;
87 export PRODUCT_TYPE=$6;
88 export INSTALL_PRODUCTS=$7;
89 shift
90 REMOVE_SRC_TMP=$8;
91 export PRODUCT="HXX2SALOMEDOC_${VERSION}"
92 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
93 export PRODUCT_SRC_DIR=${INSTALL_ROOT}/"HXX2SALOMEDOC_SRC_${VERSION}"
94 source ./common.sh
95 $PROCEDURE