mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
attempt to preserve the installation directory 'FOAM_INST_DIR' when sourcing files
This commit is contained in:
@ -107,9 +107,20 @@ fi
|
||||
|
||||
# Construct test string for remote execution.
|
||||
# Source WM_PROJECT settings if WM_PROJECT environment not set.
|
||||
# attempt to preserve the installation directory 'FOAM_INST_DIR'
|
||||
case $sourceFoam in
|
||||
*/cshrc) sourceFoam='if ( ! $?WM_PROJECT ) source '"$sourceFoam";;
|
||||
*/bashrc) sourceFoam='[ "$WM_PROJECT" ] || . '"$sourceFoam";;
|
||||
*/bashrc)
|
||||
if [ "$FOAM_INST_DIR" ]; then
|
||||
sourceFoam='[ "$WM_PROJECT" ] || '"FOAM_INST_DIR=$FOAM_INST_DIR . $sourceFoam"
|
||||
else
|
||||
sourceFoam='[ "$WM_PROJECT" ] || '". $sourceFoam"
|
||||
fi
|
||||
;;
|
||||
|
||||
*/cshrc)
|
||||
# TODO: csh equivalent to bash code (preserving FOAM_INST_DIR)
|
||||
sourceFoam='if ( ! $?WM_PROJECT ) source '"$sourceFoam"
|
||||
;;
|
||||
esac
|
||||
|
||||
# quote double-quotes for remote command line
|
||||
@ -166,7 +177,7 @@ do
|
||||
|
||||
# Set colour
|
||||
colour=${colours[$colourIndex]}
|
||||
#echo "** host=$host colourIndex=$colourIndex colour=$colour"
|
||||
## echo "** host=$host colourIndex=$colourIndex colour=$colour"
|
||||
|
||||
if [ "$host" = "$HOST" ]; then
|
||||
if [ "$colour" ]; then
|
||||
|
||||
Reference in New Issue
Block a user