CONFIG: eliminate most occurances of outdated FOAM_INST_DIR (issue #444)

- since 1612, FOAM_INST_DIR and foamInstDir longer have any
  special meanings when sourcing the bashrc or cshrc files.
  Thus no need for special treatment in any of the dispatch wrappers.

  Retained FOAM_INST_DIR as (unexported) variable in etc/bashrc,
  just in case people are using patched versions of etc/bashrc
  as part of their installation.

ENH: relax prefix restrictions on foamCreateVideo (issue #904)

- shift the implicit '.' to be part of the default prefix. This allows
  things like "-image myimages_00" to work as might be expected.
This commit is contained in:
Mark Olesen
2018-06-25 09:56:34 +02:00
parent f4d3c071ff
commit 831a47b81e
11 changed files with 128 additions and 171 deletions

View File

@ -181,7 +181,7 @@ do
-foamInstall | --foamInstall)
# Replace FOAM_INST_DIR=...
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
foamInstDir="$2"
prefixDir="$2"
_inlineSed \
etc/bashrc \
'\(.*BASH_SOURCE.*\)' \
@ -195,8 +195,8 @@ do
_inlineSed \
etc/bashrc \
'^ *FOAM_INST_DIR=.*' \
'FOAM_INST_DIR='"$foamInstDir" \
"Setting FOAM_INST_DIR to '$foamInstDir'"
'FOAM_INST_DIR='"$prefixDir" \
"Setting fallback FOAM_INST_DIR to '$prefixDir'"
adjusted=true
shift