check_version(){
if [ -n "${HexoticPLUGIN_ROOT_DIR}" ]; then
if [ -f ${HexoticPLUGIN_ROOT_DIR}/bin/salome/VERSION ]; then
- ver=`cat ${HexoticPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${HexoticPLUGIN_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 HexoticPLUGIN_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 HexoticPLUGIN_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}/HexoticPLUGINsourcesV${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 HexoticPLUGIN
+if [ ${INST_WITH_GUI} = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} HexoticPLUGIN
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT HexoticPLUGIN
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} HexoticPLUGIN
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}/"HexoticPLUGIN_BUILD" && rm -fr ${INST_ROOT}/"HexoticPLUGIN_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}/HexoticPLUGINWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/HexoticPLUGINbinariesV${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="HexoticPLUGIN_${SALOME_VERSION}"
export PRODUCT_SRC="HexoticPLUGIN_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
check_version(){
if [ -n "${JOBMANAGER_SRC_DIR}" ]; then
check_salome_src_version JOBMANAGER_SRC_DIR
- if [ "$ver" = "${JOBMANAGER_VERSION}" ]; then
- return 0
- fi
+ if [ "${ver}" = "${JOBMANAGER_VERSION}" ]; then
+ return 0
+ fi
fi
return 1
}
print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export JOBMANAGER_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 JOBMANAGER_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}/JOBMANAGERsourcesV${JOBMANAGER_VERSION}.tar.gz -C ${INST_ROOT}
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 JOBMANAGER
+check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} JOBMANAGER
-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}/"JOBMANAGER_BUILD" && rm -fr ${INST_ROOT}/"JOBMANAGER_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="JOBMANAGER_${JOBMANAGER_VERSION}"
export PRODUCT_SRC="JOBMANAGER_SRC_${JOBMANAGER_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${KERNEL_ROOT_DIR}" ]; then
check_lib_version VERSION ${KERNEL_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${KERNEL_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${KERNEL_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 KERNEL_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 KERNEL_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}
# unpack
check_jb tar xfz ${SOURCE_DIR}/KERNELsourcesV${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 KERNEL
+check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} KERNEL
# create environment for the built binaries
-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}/"KERNEL_BUILD" && rm -fr ${INST_ROOT}/"KERNEL_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 [ -d ${PRODUCT_DIR} ] ; then
pushd ${PRODUCT_DIR} > /dev/null
version=`cat bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]'`
- dir="${HOME}/salome_appli_$version"
- ./bin/salome/createAppli.sh $dir
- if [ -d $dir/env.d ] ; then
- rm -rf $dir/env.d/*.sh
+ dir="${HOME}/salome_appli_${version}"
+ ./bin/salome/createAppli.sh ${dir}
+ if [ -d ${dir}/env.d ] ; then
+ rm -rf ${dir}/env.d/*.sh
fi
- if [ ! -e $dir/env.d ] ; then
- mkdir -p $dir/env.d
+ if [ ! -e ${dir}/env.d ] ; then
+ mkdir -p ${dir}/env.d
fi
- cp -f ${PRODUCT_DIR}/salome.sh $dir/env.d
+ cp -f ${PRODUCT_DIR}/salome.sh ${dir}/env.d
popd > /dev/null
fi
create_config.sh ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_DIR}
shift
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="KERNEL_${SALOME_VERSION}"
export PRODUCT_SRC="KERNEL_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
check_version(){
if [ -n "${LIGHT_ROOT_DIR}" ]; then
if [ -f ${LIGHT_ROOT_DIR}/bin/salome/VERSION ]; then
- ver=`cat ${LIGHT_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${LIGHT_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 LIGHT_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 LIGHT_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}/LIGHTsourcesV${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 LIGHT
+check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} LIGHT
-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}/"LIGHT_BUILD" && rm -fr ${INST_ROOT}/"LIGHT_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="LIGHT_${SALOME_VERSION}"
export PRODUCT_SRC="LIGHT_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${MED_ROOT_DIR}" ]; then
check_lib_version VERSION ${MED_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${MED_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${MED_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 MED_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 MED_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}/MEDsourcesV${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 MED
+if [ ${INST_WITH_GUI} = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} MED
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT MED
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} MED
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}/"MED_BUILD" && rm -fr ${INST_ROOT}/"MED_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}/MEDWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/MEDbinariesV${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="MED_${SALOME_VERSION}"
export PRODUCT_SRC="MED_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${NETGENPLUGIN_ROOT_DIR}" ]; then
check_lib_version VERSION ${NETGENPLUGIN_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${NETGENPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${NETGENPLUGIN_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 NETGENPLUGIN_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 NETGENPLUGIN_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}/NETGENPLUGINsourcesV${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 NETGENPLUGIN
+if [ ${INST_WITH_GUI} = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} NETGENPLUGIN
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT NETGENPLUGIN
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} NETGENPLUGIN
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}/"NETGENPLUGIN_BUILD" && rm -fr ${INST_ROOT}/"NETGENPLUGIN_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}/NETGENPLUGINWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/NETGENPLUGINbinariesV${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="NETGENPLUGIN_${SALOME_VERSION}"
export PRODUCT_SRC="NETGENPLUGIN_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
#
# Open CASCADE Technology version
#
-OCCT_VERSION=6.5.5
+VERSION_OCCT=6.7.0
check_version()
{
-if [ -z "$CASROOT" ]; then
+if [ -z "${CAS_ROOT_DIR}" ]; then
return 1
fi
-check_lib_version ${CASROOT}/inc/Standard_Version.hxx
+check_lib_version ${CAS_ROOT_DIR}/inc/Standard_Version.hxx
if [ "$?" -ne "0" ] ; then
return 1
fi
-ver_major=`grep "#define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
-ver_minor=`grep "#define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
-ver_maint=`grep "#define OCC_VERSION_MAINTENANCE" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
-ver="$ver_major.$ver_minor.$ver_maint"
-if [ "$ver" == "${OCCT_VERSION}" ] ; then
+ver_major=`grep "#define OCC_VERSION_MAJOR" ${CAS_ROOT_DIR}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver_minor=`grep "#define OCC_VERSION_MINOR" ${CAS_ROOT_DIR}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver_maint=`grep "#define OCC_VERSION_MAINTENANCE" ${CAS_ROOT_DIR}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver="${ver_major}.${ver_minor}.${ver_maint}"
+if [ "${ver}" = "${VERSION_OCCT}" ] ; then
return 0
fi
return 1
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export CASROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export CAS_ROOT_DIR=\${CASROOT}
-export PATH=\${CASROOT}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export CAS_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${CAS_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${CAS_ROOT_DIR}/lib:\${CAS_ROOT_DIR}/lin/lib:\${LD_LIBRARY_PATH}
# Variable for Foundation Classes :
-export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
-export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat
+export CSF_UnitsLexicon=\${CAS_ROOT_DIR}/src/UnitsAPI/Lexi_Expr.dat
+export CSF_UnitsDefinition=\${CAS_ROOT_DIR}/src/UnitsAPI/Units.dat
# Variable for DataExchange :
-export CSF_SHMessage=\${CASROOT}/src/SHMessage
-export CSF_XSMessage=\${CASROOT}/src/XSMessage
+export CSF_SHMessage=\${CAS_ROOT_DIR}/src/SHMessage
+export CSF_XSMessage=\${CAS_ROOT_DIR}/src/XSMessage
# Variable for Font :
-export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT
-export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures
+export CSF_MDTVFontDirectory=\${CAS_ROOT_DIR}/src/FontMFT
+export CSF_MDTVTexturesDirectory=\${CAS_ROOT_DIR}/src/Textures
# Activation of OCCT Kernel multithreading :
export MMGT_REENTRANT=1
##
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}/${PRODUCT}.tar.gz -C ${INST_ROOT}
local patch_sources=1
-local patch_config=1
+local patch_config=0
# apply patch for sources (if there's any)
if [ "${patch_sources}" = "1" ] ; then
( cd ${PRODUCT_SRC_DIR} && sed -i "s%AM_C_PROTOTYPES%#AM_C_PROTOTYPES%g" configure.ac )
fi
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
# ... tcl/tk options
if [ "${TCLHOME}" != "" ] ; then
- flags="$flags --with-tcl=${TCLHOME}/lib"
- flags="$flags --with-tk=${TCLHOME}/lib"
+ flags="${flags} --with-tcl=${TCLHOME}/lib"
+ flags="${flags} --with-tk=${TCLHOME}/lib"
fi
# ... tbb options
-if [ "${TBBHOME}" != "" ] ; then
- flags="$flags --with-tbb-include=${TBBHOME}/include"
+if [ "${TBB_ROOT_DIR}" != "" ] ; then
+ flags="${flags} --with-tbb-include=${TBB_ROOT_DIR}/include"
if test `uname -m` = "x86_64" ; then
- flags="$flags --with-tbb-library=${TBBHOME}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21"
+ flags="${flags} --with-tbb-library=${TBB_ROOT_DIR}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21"
else
- flags="$flags --with-tbb-library=${TBBHOME}/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21"
+ flags="${flags} --with-tbb-library=${TBB_ROOT_DIR}/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21"
fi
fi
# ... freetype options
-if [ "{FREETYPEDIR}" != "" ] ; then
- flags="$flags --with-freetype=${FREETYPEDIR}"
-fi
-# ... ftgl options
-if [ "{FTGLDIR}" != "" ] ; then
- flags="$flags --with-ftgl=${FTGLDIR}"
+if [ "{FREETYPE_ROOT_DIR}" != "" ] ; then
+ flags="${flags} --with-freetype=${FREETYPE_ROOT_DIR}"
fi
# ... freeimage options
-if [ "{FREEIMAGEDIR}" != "" ] ; then
- flags="$flags --with-freeimage=${FREEIMAGEDIR}"
+if [ "{FREEIMAGE_ROOT_DIR}" != "" ] ; then
+ flags="${flags} --with-freeimage=${FREEIMAGE_ROOT_DIR}"
fi
# ... gl2ps options
-if [ "{GL2PSHOME}" != "" ] ; then
- flags="$flags --with-gl2ps=${GL2PSHOME}"
+if [ "{GL2PS_ROOT_DIR}" != "" ] ; then
+ flags="${flags} --with-gl2ps=${GL2PS_ROOT_DIR}"
fi
# other options
-flags="$flags --disable-debug --enable-production"
+flags="${flags} --disable-debug --enable-production"
check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${flags}
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install
# fix libGL dependencies
echo " +++++++++++ fix libGL dependencies"
-cd ${PRODUCT_DIR}/lib && fix_gl_libs
+( cd ${PRODUCT_DIR}/lib && fix_gl_libs )
+
+cd ${PRODUCT_DIR}
-#du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR};
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+fi
# remove sources and temporary files after building
echo "${INSTALL_PRODUCTS}" | grep -q "PatchForOpenCascade"
-if [ $? -eq 1 ] && [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ $? -eq 1 ] && [ ${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 product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
# modify *.la files
-ldir=${PRODUCT_DIR}/lib
-if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi
-if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/lin/lib; fi
-cd $ldir
-# 1. set libdir correctly, correct dependencies
+ldir=${PRODUCT_DIR}/lib
+if [ ! -d ${ldir} ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi
+if [ ! -d ${ldir} ]; then ldir=${PRODUCT_DIR}/lin/lib; fi
tcldir=`printenv TCLHOME`
-freetypedir=`printenv FREETYPEDIR`
-ftgldir=`printenv FTGLDIR`
-gl2psdir=`printenv GL2PSHOME`
-freeimagedir=`printenv FREEIMAGEDIR`
-tbbbasedir=`printenv TBBHOME`
-
+freetypedir=`printenv FREETYPE_ROOT_DIR`
+gl2psdir=`printenv GL2PS_ROOT_DIR`
+freeimagedir=`printenv FREEIMAGE_ROOT_DIR`
+tbbbasedir=`printenv TBB_ROOT_DIR`
TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21'
if test `uname -m` = "x86_64" ; then
- export TBBMODE="intel64/$TBBKERNEL"
+ export TBBMODE="intel64/${TBBKERNEL}"
else
- export TBBMODE="ia32/$TBBKERNEL"
+ export TBBMODE="ia32/${TBBKERNEL}"
fi
+tbbdir=${tbbbasedir}/lib/${TBBMODE}
-tbbdir=${tbbbasedir}/lib/$TBBMODE
+cd ${ldir}
+# 1. set libdir correctly, correct dependencies
for l in X `find . -name "*.la"`; do
- if [ "$l" != "X" ] ; then
- l=`basename $l`
- libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
- sed -e "s%${libdir}%${ldir}%g" $l > _$l
- mv -f _$l $l
+ if [ "${l}" != "X" ] ; then
+ l=`basename ${l}`
+ libdir=`grep -e "libdir=.*" ${l} | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
+ sed -i "s%${libdir}%${ldir}%g" ${l}
if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then
- sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" $l > _$l
- mv -f _$l $l
+ sed -i "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" ${l}
fi
- chmod a+x $l
if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then
- sed -e "s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${freetypedir}/lib%g" \
- -e "s%[^[:space:]]*/freetype[^[:space:]]*/lib/libfreetype.la%-lfreetype%g" $l > _$l
- mv -f _$l $l
+ sed -i "s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${freetypedir}/lib%g;s%[^[:space:]]*/freetype[^[:space:]]*/lib/libfreetype.la%-lfreetype%g" ${l}
fi
- chmod a+x $l
- if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \
- -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' $l > _$l
- mv -f _$l $l
- fi
- chmod a+x $l
if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" $l > _$l
- mv -f _$l $l
+ sed -i "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" ${l}
fi
- chmod a+x $l
if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
- mv -f _$l $l
+ sed -i "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" ${l}
fi
- chmod a+x $l
if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
- mv -f _$l $l
+ sed -i "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" ${l}
fi
- chmod a+x $l
if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then
- sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" $l > _$l
- mv -f _$l $l
+ sed -i "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%g" ${l}
fi
- chmod a+x $l
fi
done
# 2. fix libGL dependencies
-
-cd $ldir
gllibdir="`where_gl_libs`"
-if [ "$gllibdir" != "" ] ; then
+if [ "${gllibdir}" != "" ] ; then
if [ -f ${gllibdir}/libGL.la ] ; then
libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
- if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
+ if [ "`ls ${libdir}/libGL.so* 2>/dev/null`" ] ; then
str_to_replace="${gllibdir}/libGL.la"
fi
-fi
- if [ "$str_to_replace" == "" ] ; then
+ fi
+ if [ "${str_to_replace}" = "" ] ; then
str_to_replace="-L${gllibdir} -lGL"
fi
-
- sed -e "s%-lGL\b%%g" \
- -e "s%[^[:space:]\']*libGL.la[[:space:]]%%g" \
- -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
- libTKOpenGl.la > libTKOpenGl.la.new
- mv -f libTKOpenGl.la.new libTKOpenGl.la
+ sed -i "s%-lGL\b%%g;s%[^[:space:]\']*libGL.la[[:space:]]%%g;s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" libTKOpenGl.la
fi
# to generate environment script for sources
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="OCCT-${OCCT_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="OCCT-${VERSION_OCCT}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
source ./common.sh
-$PROCEDURE
+${PROCEDURE}
# 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
# 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
# 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
check_version(){
if [ -n "${RANDOMIZER_ROOT_DIR}" ]; then
if [ -f ${RANDOMIZER_ROOT_DIR}/bin/salome/VERSION ]; then
- ver=`cat ${RANDOMIZER_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${RANDOMIZER_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 RANDOMIZER_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 RANDOMIZER_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}/RANDOMIZERsourcesV${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 RANDOMIZER
+check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} RANDOMIZER
-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}/"RANDOMIZER_BUILD" && rm -fr ${INST_ROOT}/"RANDOMIZER_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="RANDOMIZER_${SALOME_VERSION}"
export PRODUCT_SRC="RANDOMIZER_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
print_env_src(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
export DATA_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 ${SRC_DIR}/SAMPLESsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
export PRODUCT="SAMPLES_${SALOME_VERSION}"
export PRODUCT_SRC="SAMPLES_SRC_${SALOME_VERSION}"
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
check_version(){
if [ -n "${SIERPINSKY_ROOT_DIR}" ]; then
if [ -f ${SIERPINSKY_ROOT_DIR}/bin/salome/VERSION ]; then
- ver=`cat ${SIERPINSKY_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${SIERPINSKY_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 SIERPINSKY_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 SIERPINSKY_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}/SIERPINSKYsourcesV${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 SIERPINSKY
+check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} SIERPINSKY
-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}/"SIERPINSKY_BUILD" && rm -fr ${INST_ROOT}/"SIERPINSKY_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="SIERPINSKY_${SALOME_VERSION}"
export PRODUCT_SRC="SIERPINSKY_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${SMESH_ROOT_DIR}" ]; then
check_lib_version VERSION ${SMESH_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${SMESH_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${SMESH_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 SMESH_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 SMESH_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}/SMESHsourcesV${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 SMESH
+if [ ${INST_WITH_GUI} = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} SMESH
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT SMESH
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} SMESH
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}/"SMESH_BUILD" && rm -fr ${INST_ROOT}/"SMESH_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}/SMESHWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/SMESHbinariesV${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="SMESH_${SALOME_VERSION}"
export PRODUCT_SRC="SMESH_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
print_env_src(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
##
EOF
(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
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 ${SRC_DIR}/TUTORIALsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
export PRODUCT="TUTORIAL_${SALOME_VERSION}"
export PRODUCT_SRC="TUTORIAL_SRC_${SALOME_VERSION}"
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
check_version(){
if [ -n "${YACS_ROOT_DIR}" ]; then
if [ -f ${YACS_ROOT_DIR}/bin/salome/VERSION ]; then
- ver=`cat ${YACS_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${YACS_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 YACS_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 YACS_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}/YACSsourcesV${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 YACS
+if [ "${INST_WITH_GUI}" = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} YACS
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT YACS
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} YACS
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}/"YACS_BUILD" && rm -fr ${INST_ROOT}/"YACS_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}/YACSWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/YACSbinariesV${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="YACS_${SALOME_VERSION}"
export PRODUCT_SRC="YACS_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
cfg_file=setup.py
if [ -f ${YACSGEN_SRC_DIR}/${cfg_file} ] ; then
ver=`grep -e "version=" ${YACSGEN_SRC_DIR}/${cfg_file} | sed s/\'/" "/g | awk '{print $2}'`
- if [ "$ver" = "${YACSGEN_VERSION}" ]; then
+ if [ "${ver}" = "${YACSGEN_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 YACSGEN_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 YACSGEN_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 ${SRC_DIR}/YACSGENsourcesV${YACSGEN_VERSION}.tar.gz -C ${INST_ROOT}
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
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="YACSGEN_${YACSGEN_VERSION}"
export PRODUCT_SRC="YACSGEN_SRC_${YACSGEN_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}