ENH: test for WM_PROJECT_DIR being set/unset in scripts

This commit is contained in:
Mark Olesen
2019-11-06 09:18:51 +01:00
committed by Andrew Heather
parent e5916fd9ba
commit ec7e3c88e4
701 changed files with 2066 additions and 1483 deletions

View File

@ -1,6 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cd ${0%/*} || exit 1 # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase
cp system/controlDict.org system/controlDict

View File

@ -1,15 +1,14 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cd ${0%/*} || exit 1 # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
application=$(getApplication)
runApplication blockMesh
runApplication $application
if ! isTest $@
if notTest $@
then
foamDictionary system/controlDict -entry endTime -set 4
foamDictionary system/controlDict -entry startTime -set 0.5

View File

@ -1,6 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cd ${0%/*} || exit 1 # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase
cp system/controlDict.org system/controlDict

View File

@ -1,15 +1,14 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
cd ${0%/*} || exit 1 # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
application=$(getApplication)
runApplication blockMesh
runApplication $application
if ! isTest $@
if notTest $@
then
foamDictionary system/controlDict -entry endTime -set 4
foamDictionary system/controlDict -entry startTime -set 0.5