mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: more consistent shell style in tutorial run/clean scripts
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user