STYLE: more consistent shell style in tutorial run/clean scripts

This commit is contained in:
Mark Olesen
2010-03-10 10:55:42 +01:00
parent 2068c67a33
commit 6b6dd51a27
112 changed files with 721 additions and 260 deletions

View File

@ -36,7 +36,8 @@ cd ${0%/*} || exit 1 # run from this directory
# logReport <logfile>
# Extracts useful info from log file.
logReport () {
logReport()
{
caseName=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
app=`echo $1 | sed s/"\(.*\)\."/""/g`
appAndCase="Application $app - case $caseName"
@ -74,19 +75,18 @@ foamRunTutorials cases
# Analyse all log files
rm testLoopReport > /dev/null 2>&1 &
touch testLoopReport
for appDir in *
do
if [ -d $appDir ]
then
(
cd $appDir
for log in `find . -name "log.*" | xargs ls -rt`
do
logReport $log >> ../testLoopReport
done
echo "" >> ../testLoopReport
)
fi
(
[ -d $appDir ] && cd $appDir || exit
for log in `find . -name "log.*" | xargs ls -rt`
do
logReport $log >> ../testLoopReport
done
echo "" >> ../testLoopReport
)
done
find . -name "log.*" -exec cat {} \; >> logs