]> SALOME platform Git repositories - tools/install.git/blob - config_files/GHS3DPLUGIN_SRC.sh
Salome HOME
Update for version 2.2.5
[tools/install.git] / config_files / GHS3DPLUGIN_SRC.sh
1 #!/bin/sh
2
3 check_version(){
4 if [ -n "${GHS3DPLUGIN_SRC_DIR}" ]; then
5     check_lib_version VERSION ${GHS3DPLUGIN_SRC_DIR}/bin
6     if [ "$?" -eq "0" ]; then
7         ver=`cat ${GHS3DPLUGIN_SRC_DIR}/bin/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
8         if [ "$ver" = "2.2.5" ]; then
9             return 0
10         fi
11     fi
12   return 0
13 fi
14 return 1
15 }
16
17 print_env(){
18 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
19 #$DELIM ${PRODUCT_TYPE} $DELIM
20 export GHS3DPLUGIN_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
21 ##
22 EOF
23 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
24 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
25 }
26
27 # looks for the native product and collects it's environment (used by make_env())
28 try_native(){
29 check_version
30 if [ $? -eq 0 ] ; then
31     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
32 #$DELIM ${PRODUCT_TYPE} $DELIM
33 export GHS3DPLUGIN_SRC_DIR=${GHS3DPLUGIN_SRC_DIR}
34 ##
35 EOF
36     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
37     return 0
38 fi
39 return 1;
40 }
41
42 try_preinstalled(){
43 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
44 return $?
45 }
46
47 install_source()
48 {
49 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
50 source ${INSTALL_WORK}/$SHRC
51
52 check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINsourcesV2.2.5.tar.gz -C ${INSTALL_ROOT}
53
54 print_env
55 }
56
57 install_binary()
58 {
59 return 1
60 }
61
62 export PROCEDURE=$1;
63 export INSTALL_WORK=$2;
64 export SOURCE_DIR=$3;
65 export INSTALL_ROOT=$4;
66 export PRODUCT_SEQUENCE=$5;
67 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="GHS3DPLUGINSrc" ; fi
68 export PRODUCT="GHS3DPLUGIN_SRC_2.2.5"
69 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
70 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
71 source ./common.sh
72 $PROCEDURE