Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
d2d007f0
Commit
d2d007f0
authored
Feb 15, 2016
by
Henry Weller
Browse files
foamRunTutorials: Removed redundant code and simplified
parent
4bb7f08e
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/foamRunTutorials
View file @
d2d007f0
...
...
@@ -26,47 +26,15 @@
# foamRunTutorials
#
# Description
#
Run either Allrun or blockMesh/application in current directory
#
and all its subdirectories.
# Run either Allrun or blockMesh/application in current directory
# and all its subdirectories.
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Select the version of make to be used
#------------------------------------------------------------------------------
# normally use "make"
# Normally use standard "make"
make
=
"make"
runTests
=
false
skipFirst
=
false
## set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
#if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ]
#then
# WM_NCOMPPROCS=$(wmakeScheduler -count)
# [ $? -eq 0 ] || unset WM_NCOMPPROCS
#fi
#
#if [ "$WM_NCOMPPROCS" ]
#then
# if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ]
# then
# lockDir=$HOME/.$WM_PROJECT/.wmake
#
# if [ -d $lockDir ]
# then
# rm -f $lockDir/*
# else
# mkdir -p $lockDir
# fi
#
# make="make --no-print-directory -j "$WM_NCOMPPROCS
# fi
#fi
# Source tutorial functions
# Source tutorial run functions
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
thisScript
=
$0
...
...
@@ -75,13 +43,14 @@ then
thisScript
=
"
$PWD
/
$thisScript
"
fi
skipFirst
=
false
#
p
arse options
#
P
arse options
while
[
"$#"
-gt
0
]
do
case
"
$1
"
in
-t
|
-test
)
runTests
=
true
passArgs
=
"-test"
shift
;;
-s
|
-skipFirst
)
...
...
@@ -94,20 +63,14 @@ do
esac
done
passArgs
=
$(
if
$runTests
;
then
echo
"-test"
;
fi
)
# If an argument is supplied do not execute ./Allrun to avoid recursion
if
!
$skipFirst
&&
$runTests
&&
[
-f
"./Alltest"
]
then
# Run a special test script.
./Alltest
$passArgs
elif
!
$skipFirst
&&
[
-f
"./Allrun"
]
if
!
$skipFirst
&&
[
-f
"./Allrun"
]
then
#
S
pecialised script.
#
Run s
pecialised
Allrun
script.
./Allrun
$passArgs
elif
[
-d
system
]
then
#
N
ormal case.
#
Run n
ormal case.
parentDir
=
`
dirname
$PWD
`
application
=
`
getApplication
`
runApplication blockMesh
...
...
@@ -123,10 +86,7 @@ else
done
FOAM_TARGETS
=
$(
for
d
in
*
;
do
[
-d
"
$d
"
]
&&
echo
"
$d
"
;
done
| xargs
)
#$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs \
# FOAM_TARGETS="$FOAM_TARGETS" \
# FOAM_APP="$WM_SCHEDULER $thisScript" FOAM_ARGS="$passArgs"
# Run all cases which have not already been run
$make
-k
-f
$WM_PROJECT_DIR
/bin/tools/MakefileDirs
\
FOAM_TARGETS
=
"
$FOAM_TARGETS
"
\
FOAM_APP
=
"
$thisScript
"
FOAM_ARGS
=
"
$passArgs
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment