From c9fc8595e051cc5cf5afe2fe0c7ef12673ec33fa Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 19 Dec 2013 15:14:57 +0000 Subject: [PATCH] Fix pb in the script updating config files --- config_files/common.sh | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/config_files/common.sh b/config_files/common.sh index bd993f6..ea81a8c 100755 --- a/config_files/common.sh +++ b/config_files/common.sh @@ -975,91 +975,91 @@ modif_cfg_file(){ return fi if [ "${PYTHON_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/Python-[0-9.]\+%\1${PYTHON_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/Python-[0-9.]\+%\1${PYTHON_ROOT_DIR}%g" $1 fi if [ "${SWIG_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/swig-[0-9.]\+%\1${SWIG_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/swig-[0-9.]\+%\1${SWIG_ROOT_DIR}%g" $1 fi if [ "${OMNIORB_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/omniORB-[0-9.]\+%\1${OMNIORB_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/omniORB-[0-9.]\+%\1${OMNIORB_ROOT_DIR}%g" $1 fi if [ "${HDF5_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/hdf5-[0-9.]\+%\1${HDF5_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/hdf5-[0-9.]\+%\1${HDF5_ROOT_DIR}%g" $1 fi if [ "${BOOST_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/boost-[0-9.]\+%\1${BOOST_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/boost-[0-9.]\+%\1${BOOST_ROOT_DIR}%g" $1 fi if [ "${MEDFILE_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/med-[0-9.]\+%\1${MEDFILE_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/med-[0-9.]\+%\1${MEDFILE_ROOT_DIR}%g" $1 fi if [ "${QT4_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/qt-[0-9.]\+%\1${QT4_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/qt-[0-9.]\+%\1${QT4_ROOT_DIR}%g" $1 fi if [ "${QWT_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/qwt-[0-9.]\+%\1${QWT_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/qwt-[0-9.]\+%\1${QWT_ROOT_DIR}%g" $1 fi if [ "${SIP_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/sip-[0-9.]\+%\1${SIP_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/sip-[0-9.]\+%\1${SIP_ROOT_DIR}%g" $1 fi if [ "${PYQT4_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/PyQt-[0-9.]\+%\1${PYQT4_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/PyQt-[0-9.]\+%\1${PYQT4_ROOT_DIR}%g" $1 fi if [ "${QSCINTILLA_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/QScintilla-[0-9.]\+%\1${QSCINTILLA_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/QScintilla-[0-9.]\+%\1${QSCINTILLA_ROOT_DIR}%g" $1 fi if [ "${PARAVIEW_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/ParaView-[0-9.]\+%\1${PARAVIEW_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/ParaView-[0-9.]\+%\1${PARAVIEW_ROOT_DIR}%g" $1 fi if [ "${LIBXML2_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/libxml2-[0-9.]\+%\1${LIBXML2_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/libxml2-[0-9.]\+%\1${LIBXML2_ROOT_DIR}%g" $1 fi if [ "${EXPAT_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/expat-[0-9.]\+%\1${EXPAT_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/expat-[0-9.]\+%\1${EXPAT_ROOT_DIR}%g" $1 fi if [ "${FREETYPE_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/freetype-[0-9.]\+%\1${FREETYPE_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/freetype-[0-9.]\+%\1${FREETYPE_ROOT_DIR}%g" $1 fi if [ "${FREEIMAGE_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/freeimage-[0-9.]\+%\1${FREEIMAGE_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/freeimage-[0-9.]\+%\1${FREEIMAGE_ROOT_DIR}%g" $1 fi if [ "${GL2PS_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/gl2ps-[0-9.]\+%\1${GL2PS_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/gl2ps-[0-9.]\+%\1${GL2PS_ROOT_DIR}%g" $1 fi if [ "${TBB_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/tbb[^/]\+%\1${TBB_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/tbb[^/]\+%\1${TBB_ROOT_DIR}%g" $1 fi if [ "${CAS_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/OCCT[^/]*%\1${CAS_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/OCCT[^/]*\(/[^ /;\"]*\)\?\(\"\|/inc\|/lib\)%\1${CAS_ROOT_DIR}\3%g" $1 fi if [ "${NETGEN_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/netgen-[0-9.]\+%\1${NETGEN_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/netgen-[0-9.]\+%\1${NETGEN_ROOT_DIR}%g" $1 fi if [ "${CGNS_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/cgnslib-[0-9.]\+%\1${CGNS_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/cgnslib-[0-9.]\+%\1${CGNS_ROOT_DIR}%g" $1 fi if [ "${NUMPY_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/numpy-[0-9.]\+%\1${NUMPY_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/numpy-[0-9.]\+%\1${NUMPY_ROOT_DIR}%g" $1 fi if [ "${GRAPHVIZ_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/graphviz-[0-9.]\+%\1${GRAPHVIZ_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/graphviz-[0-9.]\+%\1${GRAPHVIZ_ROOT_DIR}%g" $1 fi if [ "${DOXYGEN_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/doxygen-[0-9.]\+%\1${DOXYGEN_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/doxygen-[0-9.]\+%\1${DOXYGEN_ROOT_DIR}%g" $1 fi if [ "${SPHINX_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/Sphinx-[0-9.]\+%\1${SPHINX_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/Sphinx-[0-9.]\+%\1${SPHINX_ROOT_DIR}%g" $1 fi if [ "${WSO2_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/wso2-wsf-cpp-[0-9.]\+%\1${WSO2_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/wso2-wsf-cpp-[0-9.]\+%\1${WSO2_ROOT_DIR}%g" $1 fi if [ "${MESHGEMS_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/MeshGems-[0-9.]\+%\1${MESHGEMS_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/MeshGems-[0-9.]\+%\1${MESHGEMS_ROOT_DIR}%g" $1 fi if [ "${METIS_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/metis-[0-9.]\+%\1${METIS_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/metis-[0-9.]\+%\1${METIS_ROOT_DIR}%g" $1 fi if [ "${SCOTCH_ROOT_DIR}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/scotch-[0-9.]\+%\1${SCOTCH_ROOT_DIR}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/scotch-[0-9.]\+%\1${SCOTCH_ROOT_DIR}%g" $1 fi local sm local smvar @@ -1068,7 +1068,7 @@ modif_cfg_file(){ CALCULATOR PYCALCULATOR COMPONENT HELLO PYHELLO LIGHT PYLIGHT ATOMIC ATOMGEN ATOMSOLV RANDOMIZER SIERPINSKY ; do smvar=${sm}_ROOT_DIR if [ "${!smvar}" != "" ] ; then - sed -i "s%\([^/]*\)[^;]*/${sm}[^/\"]*%\1${!smvar}%g" $1 + sed -i "s%\([^/]*\)[^; ]*/${sm}[^/\"]*%\1${!smvar}%g" $1 fi done } -- 2.39.2