check_version(){
if [ -n "${HELLO_ROOT_DIR}" ]; then
if [ -f ${HELLO_ROOT_DIR}/bin/salome/VERSION ]; then
- ver=`cat ${HELLO_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${HELLO_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
+ if [ "${ver}" = "${SALOME_VERSION}" ]; then
return 0
fi
fi
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export HELLO_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
if [ "\${ENV_FOR_LAUNCH}" = "1" ] ; then
print_env_src(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
export HELLO_SRC_DIR=\${INST_ROOT}/${PRODUCT_SRC}
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/HELLOsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
# build sources
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-if [ -e ./build.sh ] ; then
+if [ -e ./build.sh ] && [ ! -e ${INST_ROOT}/build.sh ]; then
cp -f ./build.sh ${INST_ROOT}
fi
CUR_DIR=`pwd`
cd ${INST_ROOT}
-check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT HELLO
+check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} HELLO
-cd $CUR_DIR
+cd ${CUR_DIR}
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
test -d ${INST_ROOT}/"HELLO_BUILD" && rm -fr ${INST_ROOT}/"HELLO_BUILD"
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a module directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
REMOVE_SRC_TMP=$8;
shift
SINGLE_DIR=$9;
-if [ -n "$SINGLE_DIR" ] ; then SINGLE_DIR=$SDIR_NAME; fi
+if [ -n "${SINGLE_DIR}" ] ; then SINGLE_DIR=${SDIR_NAME}; fi
export PRODUCT="HELLO_${SALOME_VERSION}"
export PRODUCT_SRC="HELLO_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${HEXABLOCK_ROOT_DIR}" ]; then
check_lib_version VERSION ${HEXABLOCK_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${HEXABLOCK_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${HEXABLOCK_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
+ if [ "${ver}" = "${SALOME_VERSION}" ]; then
return 0
fi
fi
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export HEXABLOCK_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
if [ "\${ENV_FOR_LAUNCH}" = "1" ] ; then
print_env_src(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
export HEXABLOCK_SRC_DIR=\${INST_ROOT}/${PRODUCT_SRC}
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/HEXABLOCKsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
# build sources
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-if [ -e ./build.sh ] ; then
+if [ -e ./build.sh ] && [ ! -e ${INST_ROOT}/build.sh ]; then
cp -f ./build.sh ${INST_ROOT}
fi
CUR_DIR=`pwd`
cd ${INST_ROOT}
-if [ "$INST_WITH_GUI" = "FALSE" ] ; then
- check_jb ./build.sh -o -b -w -d -v 0 -p $INST_ROOT HEXABLOCK
+if [ "${INST_WITH_GUI}" = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} HEXABLOCK
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT HEXABLOCK
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} HEXABLOCK
fi
-cd $CUR_DIR
+cd ${CUR_DIR}
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
test -d ${INST_ROOT}/"HEXABLOCK_BUILD" && rm -fr ${INST_ROOT}/"HEXABLOCK_BUILD"
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a module directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-if [ "$INST_WITH_GUI" = "FALSE" ] ; then
+if [ "${INST_WITH_GUI}" = "FALSE" ] ; then
check_jb tar xfz ${SOURCE_DIR}/HEXABLOCKWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/HEXABLOCKbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
INST_WITH_GUI=$9;
shift
SINGLE_DIR=$9;
-if [ -n "$SINGLE_DIR" ] ; then SINGLE_DIR=$SDIR_NAME; fi
+if [ -n "${SINGLE_DIR}" ] ; then SINGLE_DIR=${SDIR_NAME}; fi
export PRODUCT="HEXABLOCK_${SALOME_VERSION}"
export PRODUCT_SRC="HEXABLOCK_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${HEXABLOCKPLUGIN_ROOT_DIR}" ]; then
check_lib_version VERSION ${HEXABLOCKPLUGIN_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${HEXABLOCKPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${HEXABLOCKPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
+ if [ "${ver}" = "${SALOME_VERSION}" ]; then
return 0
fi
fi
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export HEXABLOCKPLUGIN_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
if [ "\${ENV_FOR_LAUNCH}" = "1" ] ; then
print_env_src(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
export HEXABLOCKPLUGIN_SRC_DIR=\${INST_ROOT}/${PRODUCT_SRC}
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/HEXABLOCKPLUGINsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
# build sources
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-if [ -e ./build.sh ] ; then
+if [ -e ./build.sh ] && [ ! -e ${INST_ROOT}/build.sh ]; then
cp -f ./build.sh ${INST_ROOT}
fi
CUR_DIR=`pwd`
cd ${INST_ROOT}
-if [ "$INST_WITH_GUI" = "FALSE" ] ; then
- check_jb ./build.sh -o -b -w -d -v 0 -p $INST_ROOT HEXABLOCKPLUGIN
+if [ "${INST_WITH_GUI}" = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} HEXABLOCKPLUGIN
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT HEXABLOCKPLUGIN
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} HEXABLOCKPLUGIN
fi
-cd $CUR_DIR
+cd ${CUR_DIR}
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
test -d ${INST_ROOT}/"HEXABLOCKPLUGIN_BUILD" && rm -fr ${INST_ROOT}/"HEXABLOCKPLUGIN_BUILD"
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a module directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-if [ "$INST_WITH_GUI" = "FALSE" ] ; then
+if [ "${INST_WITH_GUI}" = "FALSE" ] ; then
check_jb tar xfz ${SOURCE_DIR}/HEXABLOCKPLUGINWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/HEXABLOCKPLUGINbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
INST_WITH_GUI=$9;
shift
SINGLE_DIR=$9;
-if [ -n "$SINGLE_DIR" ] ; then SINGLE_DIR=$SDIR_NAME; fi
+if [ -n "${SINGLE_DIR}" ] ; then SINGLE_DIR=${SDIR_NAME}; fi
export PRODUCT="HEXABLOCKPLUGIN_${SALOME_VERSION}"
export PRODUCT_SRC="HEXABLOCKPLUGIN_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${HOMARD_ROOT_DIR}" ]; then
check_lib_version VERSION ${HOMARD_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${HOMARD_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${HOMARD_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
+ if [ "${ver}" = "${SALOME_VERSION}" ]; then
return 0
fi
fi
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export HOMARD_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
if [ "\${ENV_FOR_LAUNCH}" = "1" ] ; then
print_env_src(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
export HOMARD_SRC_DIR=\${INST_ROOT}/${PRODUCT_SRC}
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/HOMARDsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
# build sources
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-if [ -e ./build.sh ] ; then
+if [ -e ./build.sh ] && [ ! -e ${INST_ROOT}/build.sh ]; then
cp -f ./build.sh ${INST_ROOT}
fi
CUR_DIR=`pwd`
cd ${INST_ROOT}
-if [ "$INST_WITH_GUI" = "FALSE" ] ; then
- check_jb ./build.sh -o -b -w -d -v 0 -p $INST_ROOT HOMARD
+if [ "${INST_WITH_GUI}" = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} HOMARD
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT HOMARD
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} HOMARD
fi
-cd $CUR_DIR
+cd ${CUR_DIR}
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
test -d ${INST_ROOT}/"HOMARD_BUILD" && rm -fr ${INST_ROOT}/"HOMARD_BUILD"
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a module directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-if [ "$INST_WITH_GUI" = "FALSE" ] ; then
+if [ "${INST_WITH_GUI}" = "FALSE" ] ; then
check_jb tar xfz ${SOURCE_DIR}/HOMARDWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/HOMARDbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
INST_WITH_GUI=$9;
shift
SINGLE_DIR=$9;
-if [ -n "$SINGLE_DIR" ] ; then SINGLE_DIR=$SDIR_NAME; fi
+if [ -n "${SINGLE_DIR}" ] ; then SINGLE_DIR=${SDIR_NAME}; fi
export PRODUCT="HOMARD_${SALOME_VERSION}"
export PRODUCT_SRC="HOMARD_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export HXX2SALOME_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/bin
export PATH=\${HXX2SALOME_ROOT_DIR}:\${PATH}
##
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# unpack
check_jb tar xfz ${SOURCE_DIR}/HXX2SALOMEsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
cd ${PRODUCT_DIR};
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a module directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
REMOVE_SRC_TMP=$8;
shift
SINGLE_DIR=$9;
-if [ -n "$SINGLE_DIR" ] ; then SINGLE_DIR=$SDIR_NAME; fi
+if [ -n "${SINGLE_DIR}" ] ; then SINGLE_DIR=${SDIR_NAME}; fi
export PRODUCT="HXX2SALOME_${SALOME_VERSION}"
export PRODUCT_SRC="HXX2SALOME_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
#nothing to do
##
EOF
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source(){
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# unpack
check_jb tar xfz ${SOURCE_DIR}/HXX2SALOMEDOCsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
install_source
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
REMOVE_SRC_TMP=$8;
shift
SINGLE_DIR=$9;
-if [ -n "$SINGLE_DIR" ] ; then SINGLE_DIR=$SDIR_NAME; fi
+if [ -n "${SINGLE_DIR}" ] ; then SINGLE_DIR=${SDIR_NAME}; fi
export PRODUCT="HXX2SALOMEDOC_${SALOME_VERSION}"
export PRODUCT_SRC="HXX2SALOMEDOC_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
--- /dev/null
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : PYCALCULATOR.sh
+# Created : Thu Dec 18 12:01:00 2002
+# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+# Project : SALOME
+# Module : Installation Wizard
+# Copyright : 2002-2013 CEA
+#
+# This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version(){
+if [ -n "${PYCALCULATOR_ROOT_DIR}" ]; then
+ check_lib_version VERSION ${PYCALCULATOR_ROOT_DIR}/bin/salome
+ if [ "$?" -eq "0" ]; then
+ ver=`head -n1 ${PYCALCULATOR_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
+ if [ "${ver}" = "${SALOME_VERSION}" ]; then
+ return 0
+ fi
+ fi
+elif [ -n "${PYCALCULATOR_SRC_DIR}" ]; then
+ check_salome_src_version PYCALCULATOR_SRC_DIR
+ if [ $? -eq 0 ] ; then return 0 ; fi
+ return 1
+fi
+return 1
+}
+
+print_env_bin(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export PYCALCULATOR_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+ if [ "\${ENV_FOR_LAUNCH}" = "1" ] ; then
+ export PATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
+ export LD_LIBRARY_PATH=\${PYCALCULATOR_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+ export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PYCALCULATOR_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+ fi
+fi
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
+export PYCALCULATOR_SRC_DIR=\${INST_ROOT}/${PRODUCT_SRC}
+##
+EOF
+
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/${SHRC}
+
+check_jb tar xfz ${SOURCE_DIR}/PYCALCULATORsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+if [ -e ./build.sh ] && [ ! -e ${INST_ROOT}/build.sh ]; then
+ cp -f ./build.sh ${INST_ROOT}
+fi
+
+CUR_DIR=`pwd`
+cd ${INST_ROOT}
+check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} PYCALCULATOR
+
+cd ${CUR_DIR}
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
+ test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
+ test -d ${INST_ROOT}/"PYCALCULATOR_BUILD" && rm -fr ${INST_ROOT}/"PYCALCULATOR_BUILD"
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/${SHRC}
+
+# create a module directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/PYCALCULATORbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
+check_jb tar xfz ${SRC_DIR}/PYCALCULATORsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
+
+# modify all *.la files
+export PYCALCULATOR_ROOT_DIR=${PRODUCT_DIR}
+test -z ${SINGLE_DIR} && modif_la_files ${PRODUCT_DIR}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+source ./common.sh
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+SRC_DIR=$8;
+shift
+REMOVE_SRC_TMP=$8;
+shift
+SINGLE_DIR=$9;
+if [ -n "${SINGLE_DIR}" ] ; then SINGLE_DIR=${SDIR_NAME}; fi
+export PRODUCT="PYCALCULATOR_${SALOME_VERSION}"
+export PRODUCT_SRC="PYCALCULATOR_SRC_${SALOME_VERSION}"
+export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
+${PROCEDURE}