]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
SALOME 7.3.0 preparation : change create_config.sh script
authorvsr <vsr@opencascade.com>
Tue, 24 Dec 2013 05:54:27 +0000 (05:54 +0000)
committervsr <vsr@opencascade.com>
Tue, 24 Dec 2013 05:54:27 +0000 (05:54 +0000)
config_files/KERNEL.sh
config_files/create_config.sh

index 1e0a5ed713d025db815bc64f3ef1559732b8620d..f417f1e18e233e965ff374a6091bfa1f35ca6c1c 100755 (executable)
@@ -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_config.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}
 }
 
index 8dc80eb0713703990239ac9f5ca8118375eab63e..1e8832a36f618bdc7739800695956d20fba35d38 100755 (executable)
@@ -44,17 +44,17 @@ echo "  <prerequisites path=\"${INST_ROOT}/env_products.sh\"/>" >> ${CONFIG_FILE
 echo "  <modules>" >> ${CONFIG_FILE}
 
 # for each module create <module> 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"
+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 "    <module name=\"${p}\" gui=\"no\" path=\"${pdir}\"/>" >> ${CONFIG_FILE} ;;
+           * ) echo "    <module name=\"${p}\" gui=\"yes\" path=\"${pdir}\"/>" >> ${CONFIG_FILE} ;;
+       esac
     fi
-    path_attr="`printenv ${mod}_ROOT_DIR`"
-    echo "    <module name=\"${mod}\" gui=\"${gui_attr}\" path=\"${path_attr}\"/>" >> ${CONFIG_FILE}
 done
 
 # end <modules> tag
@@ -69,6 +69,6 @@ fi
 echo "</application>" >> ${CONFIG_FILE}
 
 # copy resulting confuguration file to the KERNEL module
-if [ -n ${PRODUCT_DIR} ] && [ -d ${PRODUCT_DIR} ] ; then
+if [ -n "${PRODUCT_DIR}" ] && [ -d ${PRODUCT_DIR} ] ; then
     cp -f ${CONFIG_FILE} ${PRODUCT_DIR}/bin/salome
 fi