From: vsr Date: Mon, 26 May 2014 06:51:12 +0000 (+0400) Subject: Rename create_config.sh to create_application.sh X-Git-Tag: V7_4_0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=10f66b40c524ff2c7ef73ef2b0213db79ba721cd;p=tools%2Finstall.git Rename create_config.sh to create_application.sh --- diff --git a/config_files/KERNEL.sh b/config_files/KERNEL.sh index a57de85..00df5a7 100755 --- a/config_files/KERNEL.sh +++ b/config_files/KERNEL.sh @@ -141,7 +141,7 @@ if [ -f ${PRODUCT_DIR}/bin/salome/createAppli.sh ] ; then 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} +./create_application.sh ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_DIR} make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src ${PRODUCT_SRC_DIR} } diff --git a/config_files/create_application.sh b/config_files/create_application.sh new file mode 100755 index 0000000..2facfd8 --- /dev/null +++ b/config_files/create_application.sh @@ -0,0 +1,74 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : create_config.sh +# Created : Fri May 30 10:40:01 2008 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2014 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +source ./common.sh + +export INST_ROOT=$1 +export INSTALL_WORK=$2 +export PRODUCT_SEQUENCE=$3 +export INSTALL_PRODUCTS=$4 +export PRODUCT_DIR=$5 + +# --- configuration file --- +CONFIG_FILE=${INSTALL_WORK}/config_appli.xml + +# create and source environment file +make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" +source ${INSTALL_WORK}/${SHRC} + +# remove config file +if [ -e ${CONFIG_FILE} ] ; then + rm ${CONFIG_FILE} +fi +# create empty config file +touch ${CONFIG_FILE} + +# begin tag +echo "" >> ${CONFIG_FILE} + +# tag : path to the environment script +echo " " >> ${CONFIG_FILE} + +# begin tag +echo " " >> ${CONFIG_FILE} + +# for each module create tag +ALL_ENV="`env | awk -F_ '/[a-zA-Z0-9]*_ROOT_DIR/ { print $1 }' | grep -v -E '^SALOME$'`" + +for p in ${ALL_ENV} ; do + pvar=${p}_ROOT_DIR + pdir=${!pvar} + if [ -d ${pdir}/share/salome/resources ] ; then + case ${p} in + KERNEL | GUI | *PLUGIN ) echo " " >> ${CONFIG_FILE} ;; + * ) echo " " >> ${CONFIG_FILE} ;; + esac + fi +done + +# end tag +echo " " >> ${CONFIG_FILE} + +# tag : path to the samples directory +if [ -n ${DATA_DIR} ] && [ -d ${DATA_DIR} ] ; then + echo " " >> ${CONFIG_FILE} +fi + +# end tag +echo "" >> ${CONFIG_FILE} + +# copy resulting confuguration file to the KERNEL module +if [ -n "${PRODUCT_DIR}" ] && [ -d ${PRODUCT_DIR} ] ; then + cp -f ${CONFIG_FILE} ${PRODUCT_DIR}/bin/salome +fi diff --git a/config_files/create_config.sh b/config_files/create_config.sh deleted file mode 100755 index 2facfd8..0000000 --- a/config_files/create_config.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : create_config.sh -# Created : Fri May 30 10:40:01 2008 -# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) -# Project : SALOME -# Module : Installation Wizard -# Copyright : 2002-2014 CEA -# -# This script is the part of the SALOME installation procedure. -# -#################################################################################### - -source ./common.sh - -export INST_ROOT=$1 -export INSTALL_WORK=$2 -export PRODUCT_SEQUENCE=$3 -export INSTALL_PRODUCTS=$4 -export PRODUCT_DIR=$5 - -# --- configuration file --- -CONFIG_FILE=${INSTALL_WORK}/config_appli.xml - -# create and source environment file -make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" -source ${INSTALL_WORK}/${SHRC} - -# remove config file -if [ -e ${CONFIG_FILE} ] ; then - rm ${CONFIG_FILE} -fi -# create empty config file -touch ${CONFIG_FILE} - -# begin tag -echo "" >> ${CONFIG_FILE} - -# tag : path to the environment script -echo " " >> ${CONFIG_FILE} - -# begin tag -echo " " >> ${CONFIG_FILE} - -# for each module create tag -ALL_ENV="`env | awk -F_ '/[a-zA-Z0-9]*_ROOT_DIR/ { print $1 }' | grep -v -E '^SALOME$'`" - -for p in ${ALL_ENV} ; do - pvar=${p}_ROOT_DIR - pdir=${!pvar} - if [ -d ${pdir}/share/salome/resources ] ; then - case ${p} in - KERNEL | GUI | *PLUGIN ) echo " " >> ${CONFIG_FILE} ;; - * ) echo " " >> ${CONFIG_FILE} ;; - esac - fi -done - -# end tag -echo " " >> ${CONFIG_FILE} - -# tag : path to the samples directory -if [ -n ${DATA_DIR} ] && [ -d ${DATA_DIR} ] ; then - echo " " >> ${CONFIG_FILE} -fi - -# end tag -echo "" >> ${CONFIG_FILE} - -# copy resulting confuguration file to the KERNEL module -if [ -n "${PRODUCT_DIR}" ] && [ -d ${PRODUCT_DIR} ] ; then - cp -f ${CONFIG_FILE} ${PRODUCT_DIR}/bin/salome -fi