mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: use project api instead of version when finding config files
This commit is contained in:
@ -16,6 +16,9 @@
|
||||
# Description
|
||||
# Quickly test the tutorials and write out the scheme/solver information
|
||||
#
|
||||
# Environment
|
||||
# The entire OpenFOAM environment (WM_PROJECT_DIR, etc)
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
@ -128,24 +131,18 @@ EOF
|
||||
|
||||
|
||||
#
|
||||
# Location of the main controlDict
|
||||
# Location of the user or project controlDict
|
||||
#
|
||||
unset MAIN_CONTROL_DICT
|
||||
|
||||
for i in \
|
||||
$HOME/.$WM_PROJECT/$WM_PROJECT_VERSION \
|
||||
$HOME/.$WM_PROJECT \
|
||||
$WM_PROJECT_DIR/etc \
|
||||
;
|
||||
do
|
||||
if [ -f "$i/controlDict" ]
|
||||
if MAIN_CONTROL_DICT="$($WM_PROJECT_DIR/bin/foamEtcFile -mode=uo controlDict)"
|
||||
then
|
||||
if [ -e "${MAIN_CONTROL_DICT}.orig" ]
|
||||
then
|
||||
MAIN_CONTROL_DICT="$i/controlDict"
|
||||
break
|
||||
die "File ${MAIN_CONTROL_DICT}.orig already exists" \
|
||||
"Did Alltest fail in some way and then run again?"
|
||||
fi
|
||||
done
|
||||
|
||||
[ -f "$MAIN_CONTROL_DICT" ] || usage "Main controlDict not found"
|
||||
else
|
||||
die "No main (user or project) controlDict found"
|
||||
fi
|
||||
|
||||
|
||||
TUTORIALS_DIR=$ROOT
|
||||
@ -182,13 +179,6 @@ then
|
||||
rm -rf $buildDir
|
||||
fi
|
||||
|
||||
if [ -e ${MAIN_CONTROL_DICT}.orig ]
|
||||
then
|
||||
die "File ${MAIN_CONTROL_DICT}.orig already exists" \
|
||||
"Did Alltest fail in some way and then run again?"
|
||||
fi
|
||||
|
||||
|
||||
unset gitbase
|
||||
|
||||
if [ -n "$useGit" ]
|
||||
|
||||
Reference in New Issue
Block a user