From 15fecb3f61ff561bd2aed6397d8d37587e729e09 Mon Sep 17 00:00:00 2001 From: Michael Wild Date: Sun, 20 Jun 2010 12:46:54 +0200 Subject: [PATCH] FIX: Use character classes in Alltest Signed-off-by: Michael Wild --- tutorials/Alltest.in | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tutorials/Alltest.in b/tutorials/Alltest.in index 0377a7788..7c8f4d4d1 100755 --- a/tutorials/Alltest.in +++ b/tutorials/Alltest.in @@ -137,8 +137,8 @@ echo "and modifying ${MODIFIED_CONTROL_DICT}" cp @FOAM_CP_A_FLAGS@ "`dirname ${MAIN_CONTROL_DICT}`" "${TEST_RUN_DIR}/" sed \ --e s/"\(fvSchemes[ \t]*\)\([0-9]\);"/"\1 1;"/g \ --e s/"\(solution[ \t]*\)\([0-9]\);"/"\1 1;"/g \ +-e s/"\(fvSchemes[[:space:]]*\)\([0-9]\);"/"\1 1;"/g \ +-e s/"\(solution[[:space:]]*\)\([0-9]\);"/"\1 1;"/g \ ${MAIN_CONTROL_DICT} > ${MODIFIED_CONTROL_DICT} echo "Modifying the controlDicts to run only one time step" @@ -148,10 +148,10 @@ for CD in `find . -name "controlDict*" -print -o -type d -name etc -prune` do mv ${CD} ${CD}.org sed \ - -e s/"\(startFrom[ \t]*\)\([a-zA-Z]*\);"/"\1 latestTime;"/g \ - -e s/"\(stopAt[ \t]*\)\([a-zA-Z]*\);"/"\1 nextWrite;"/g \ - -e s/"\(writeControl[ \t]*\)\([a-zA-Z]*\);"/"\1 timeStep;"/g \ - -e s/"\(writeInterval[ \t]*\)\([0-9a-zA-Z.-]*\);"/"\1 1;"/g \ + -e s/"\(startFrom[[:space:]]*\)\([a-zA-Z]*\);"/"\1 latestTime;"/g \ + -e s/"\(stopAt[[:space:]]*\)\([a-zA-Z]*\);"/"\1 nextWrite;"/g \ + -e s/"\(writeControl[[:space:]]*\)\([a-zA-Z]*\);"/"\1 timeStep;"/g \ + -e s/"\(writeInterval[[:space:]]*\)\([0-9a-zA-Z.-]*\);"/"\1 1;"/g \ ${CD}.org > ${CD} done @@ -172,8 +172,8 @@ fi for f in `find ${TEST_RUN_DIR} -type f -name Allrun`; do echo "Modifying ${f}" cp -f @FOAM_CP_A_FLAGS@ ${f} ${f}.tmp - sed -e 's|^\(export FREEFOAM_TEST_MODE=\)no|\1yes|' ${f}.tmp \ - -e "s|\${TEST_CONFIG_DIR}|${TEST_RUN_DIR}/etc|g" > ${f} + sed -e 's|^\(export FREEFOAM_TEST_MODE=\)no|\1yes|' \ + -e "s|\${TEST_CONFIG_DIR}|${TEST_RUN_DIR}/etc|g" ${f}.tmp > ${f} rm -f ${f}.tmp done @@ -181,7 +181,7 @@ done sed -e :a -e '/\\$/N; s/\\\n//; ta' Allrun > temp APPLICATIONS=\ - `grep "applications=" temp | sed 's/applications=\"\([A-Za-z \t]*\)\"/\1/g'` + `grep "applications=" temp | sed 's/applications=\"\([[:alpha:][:space:]]*\)\"/\1/g'` rm $SCHEMES_FILE > /dev/null 2>&1 for APP in $APPLICATIONS -- 2.11.4.GIT