From 8594599f9f7fc12c5c6d65bc9317c5dd3db3dbc0 Mon Sep 17 00:00:00 2001 From: maintenance team Date: Thu, 6 Nov 2008 13:10:24 +0000 Subject: [PATCH] Adding new administrative file --- config_files/create_config.sh | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 config_files/create_config.sh diff --git a/config_files/create_config.sh b/config_files/create_config.sh new file mode 100755 index 0000000..71d2cc5 --- /dev/null +++ b/config_files/create_config.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-2008 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 +SALOME_MODULES="`env | awk -F_ '/[a-zA-Z0-9]*_ROOT_DIR/ { print $1 }' | grep -v -E '^SALOME$' | grep -v -E '^HXX2SALOME$'`" +GUI_MODULES="`echo $SALOME_MODULES | tr \"[:space:]\" \"\n\" | grep -v -E \"(^KERNEL|^GUI|^SAMPLES|PLUGIN)$\"`" +for mod in ${SALOME_MODULES}; do + echo ${GUI_MODULES} | tr "[:space:]" "\n" | grep -E "^${mod}$" >& /dev/null + if [ "$?" == "0" ] ; then + gui_attr="yes" + else + gui_attr="no" + fi + path_attr="`printenv ${mod}_ROOT_DIR`" + echo " " >> ${CONFIG_FILE} +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 -- 2.39.2