# 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
# 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
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
export DEBIANFORSALOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PATH=\${DEBIANFORSALOME}/bin:\${DEBIANFORSALOME}/bin/X11:\${PATH}
export LD_LIBRARY_PATH=\${DEBIANFORSALOME}/extralibs:\${DEBIANFORSALOME}/lib:\${DEBIANFORSALOME}/bin/X11:\${LD_LIBRARY_PATH}
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}
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="DEBIANLIBS-3.1"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-$PROCEDURE
+${PROCEDURE}
####################################################################################
#
-# products versions
+# MeshGems version
#
-MESHGEMS_VERSION=1.0
-HEXOTIC_VERSION=1.0
+VERSION_MESHGEMS=1.1
+
+# Platform suffuix
if test `uname -m` = "x86_64" ; then
PLT_SUFFIX="_64"
fi
-
check_version(){
# No way to check version!
return 0
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export DISTENE_HOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export MESHGEMSHOME=\${DISTENE_HOME}/MeshGems-${MESHGEMS_VERSION}/Products
-export HEXOTICHOME=\${DISTENE_HOME}/Hexotic-${HEXOTIC_VERSION}
-export LD_LIBRARY_PATH=\${MESHGEMSHOME}/lib/Linux${PLT_SUFFIX}:\${LD_LIBRARY_PATH}
-export PATH=\${MESHGEMSHOME}/bin/Linux${PLT_SUFFIX}:\${HEXOTICHOME}/bin/Linux${PLT_SUFFIX}:\${PATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export MESHGEMS_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/Products
+export LD_LIBRARY_PATH=\${MESHGEMS_ROOT_DIR}/lib/Linux${PLT_SUFFIX}:\${LD_LIBRARY_PATH}
+export PATH=\${MESHGEMS_ROOT_DIR}/bin/Linux${PLT_SUFFIX}:\${PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
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_and_build()
{
install_binary
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ echo "0" > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+ cp ${INST_ROOT}/${PRODUCT_TYPE}.bin.size ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+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}
REMOVE_SRC_TMP=$9;
shift
BIN_DIR=$9;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="DISTENE"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="MeshGems-${VERSION_MESHGEMS}"
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}
}
print_env_bin(){
-return 1
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export DOCUMENTATION_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+##
+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 DOCUMENTATION_ROOT_DIR=\${INST_ROOT}/${PRODUCT_SRC}
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
+export DOCUMENTATION_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
+source ${INSTALL_WORK}/${SHRC}
-check_jb tar xfz ${SRC_DIR}/DOCUMENTATIONsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
+check_jb tar xfz ${SOURCE_DIR}/DOCUMENTATIONsourcesV${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} DOCUMENTATION
+
+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}/"DOCUMENTATION_BUILD" && rm -fr ${INST_ROOT}/"DOCUMENTATION_BUILD"
+fi
+
+# to generate environment scripts
+try_preinstalled
}
install_binary()
{
-install_source
+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}/DOCUMENTATIONbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
+check_jb tar xfz ${SRC_DIR}/DOCUMENTATIONsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
+
+# modify all *.la files
+export DOCUMENTATION_ROOT_DIR=${PRODUCT_DIR}
+test -z ${SINGLE_DIR} && modif_la_files ${PRODUCT_DIR}
+
+# to generate environment scripts
+try_preinstalled
}
source ./common.sh
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="DOCUMENTATION_${SALOME_VERSION}"
export PRODUCT_SRC="DOCUMENTATION_SRC_${SALOME_VERSION}"
+export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${GEOM_ROOT_DIR}" ]; then
check_lib_version VERSION ${GEOM_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${GEOM_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${GEOM_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 GEOM_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 GEOM_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}/GEOMsourcesV${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 GEOM
+if [ ${INST_WITH_GUI} = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} GEOM
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT GEOM
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} GEOM
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}/"GEOM_BUILD" && rm -fr ${INST_ROOT}/"GEOM_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}/GEOMWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/GEOMbinariesV${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="GEOM_${SALOME_VERSION}"
export PRODUCT_SRC="GEOM_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${GHS3DPLUGIN_ROOT_DIR}" ]; then
check_lib_version VERSION ${GHS3DPLUGIN_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${GHS3DPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${GHS3DPLUGIN_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 GHS3DPLUGIN_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 GHS3DPLUGIN_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}/GHS3DPLUGINsourcesV${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 GHS3DPLUGIN
+if [ ${INST_WITH_GUI} = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} GHS3DPLUGIN
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT GHS3DPLUGIN
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} GHS3DPLUGIN
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}/"GHS3DPLUGIN_BUILD" && rm -fr ${INST_ROOT}/"GHS3DPLUGIN_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}/GHS3DPLUGINWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/GHS3DPLUGINbinariesV${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="GHS3DPLUGIN_${SALOME_VERSION}"
export PRODUCT_SRC="GHS3DPLUGIN_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 "${GHS3DPRLPLUGIN_ROOT_DIR}" ]; then
if [ -f ${GHS3DPRLPLUGIN_ROOT_DIR}/bin/salome/VERSION ]; then
- ver=`cat ${GHS3DPRLPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $NF}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${GHS3DPRLPLUGIN_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 GHS3DPRLPLUGIN_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 GHS3DPRLPLUGIN_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}/GHS3DPRLPLUGINsourcesV${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 GHS3DPRLPLUGIN
+if [ ${INST_WITH_GUI} = "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p ${INST_ROOT} GHS3DPRLPLUGIN
else
- check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT GHS3DPRLPLUGIN
+ check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} GHS3DPRLPLUGIN
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}/"GHS3DPRLPLUGIN_BUILD" && rm -fr ${INST_ROOT}/"GHS3DPRLPLUGIN_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}/GHS3DPRLPLUGINWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
else
check_jb tar xfz ${SOURCE_DIR}/GHS3DPRLPLUGINbinariesV${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="GHS3DPRLPLUGIN_${SALOME_VERSION}"
export PRODUCT_SRC="GHS3DPRLPLUGIN_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}
if [ -n "${GUI_ROOT_DIR}" ]; then
check_lib_version VERSION ${GUI_ROOT_DIR}/bin/salome
if [ "$?" -eq "0" ]; then
- ver=`cat ${GUI_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
- if [ "$ver" = "${SALOME_VERSION}" ]; then
+ ver=`head -n1 ${GUI_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 GUI_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 GUI_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}/GUIsourcesV${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 GUI
+check_jb ./build.sh -o -b -d -v 0 -p ${INST_ROOT} GUI
-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}/"GUI_BUILD" && rm -fr ${INST_ROOT}/"GUI_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="GUI_${SALOME_VERSION}"
export PRODUCT_SRC="GUI_SRC_${SALOME_VERSION}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
-$PROCEDURE
+${PROCEDURE}