]> SALOME platform Git repositories - tools/install.git/blob - config_files/PYHELLO_BIN.sh
Salome HOME
67a949c276fda25e52d90f260b534e47f08e8502
[tools/install.git] / config_files / PYHELLO_BIN.sh
1 #!/bin/sh
2
3 check_version(){
4 #we don't know anything about version
5 return 0
6 }
7
8 print_env(){
9 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
10 #$DELIM ${PRODUCT_TYPE} $DELIM
11 export PYHELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
12 ##
13 EOF
14 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
15 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
16 }
17
18 # looks for the native product and collects it's environment (used by make_env())
19 try_native(){
20 check_version
21 if [ $? -eq 0 ] ; then
22     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
23 #$DELIM ${PRODUCT_TYPE} $DELIM
24 export PYHELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
25 ##
26 EOF
27     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
28     return 0
29 fi
30 return 1;
31 }
32
33 try_preinstalled(){
34 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
35 return $?
36 }
37
38 install_source()
39 {
40 return 1
41 }
42
43 install_binary()
44 {
45 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
46 source ${INSTALL_WORK}/$SHRC
47
48 check_jb tar xfz ${SOURCE_DIR}/PYHELLObinariesV2.2.3.tar.gz -C ${INSTALL_ROOT}
49
50 print_env
51 }
52
53 export PROCEDURE=$1;
54 export INSTALL_WORK=$2;
55 export SOURCE_DIR=$3;
56 export INSTALL_ROOT=$4;
57 export PRODUCT_SEQUENCE=$5;
58 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="PyHelloBin" ; fi
59 export PRODUCT="PYHELLO_2.2.3"
60 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
61 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
62 source ./common.sh
63 $PROCEDURE