ENH: handle command-line parameters in bashrc/cshrc

- this provides a means to temporarily override the default settings
  and/or the prefs.{csh,sh} settings.

  bash:
      name=       -> unset name
      name=value  -> export name=value

  csh:
      name=       -> unsetenv name
      name=value  -> setenv name value

  eg,
      . <WM_PROJECT_DIR>/etc/bashrc WM_COMPILER=Gcc45 WM_MPLIB=
  to use gcc 4.5 and the default mplib
This commit is contained in:
Mark Olesen
2010-04-26 08:49:41 +02:00
parent 9c32ce1016
commit a823b627a6
3 changed files with 35 additions and 1 deletions

View File

@ -121,7 +121,10 @@ case OpenFOAM:
set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
set mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
if ( $?mpc_version ) then
set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
endif
# Check that the compiler directory can be found
if ( ! -d "$gccDir" ) then