Commit Graph

28 Commits

Author SHA1 Message Date
Mark Olesen
c341b22f9d STYLE: use hard-coded user resource directory name for foamEtcFile
- previously used the value of $WM_PROJECT, but this is potentially
  inconsistent with what Foam::etcFiles uses.
2017-03-31 09:54:20 +02:00
Mark Olesen
bad27c45fc ENH: several improvements to foamEtcFile
- lazier evaluation of project name and version based on the directory
  name. Avoids heuristics based on directory names unless really needed.

- cope with alternative directory locations.
  For example, OpenFOAM+VERSION etc.

The combination of the two above appears to be sufficient to open up
the directory naming possibilities.

- additional -list-test option (tests for existence of directory).
2017-03-23 10:31:05 +01:00
Mark Olesen
ace5565f96 ENH: improve foamEtcFile support for alternative naming conventions
- support names like openfoam-<VERSION> (eg, what spack uses).
- robustness improvements
2017-03-22 09:08:52 +01:00
Mark Olesen
c9e4fd77fd ENH: add options for foamEtcFile and shell evaluation
- Eg, instead

      if file=$(foamEtcFile filename)
      then
          . $file
      fi

  can write

      eval "$(foamEtcFile -sh filename)"

  Also supports -verbose reporting, which is especially useful for csh,
  since it allows simplification of aliases and allows the message to
  land on stderr instead of stdout.

      eval `foamEtcFile -csh -verbose filename`
2017-02-23 12:48:43 +01:00
Mark Olesen
cc51def1fd STYLE: minor cleanup of foamEtcFile 2017-02-23 09:17:46 +01:00
Mark Olesen
d3911dd167 STYLE: avoid old-style shell backticks in various places 2017-02-20 09:30:58 +01:00
Chris Greenshields
b5e263be0d foamEtcFile: replaced redundant package directory name 2016-09-09 20:00:26 +01:00
Henry Weller
2b71ea6f58 Update headers 2016-06-06 17:22:23 +01:00
Henry Weller
b7243e2d19 etc/bashrc,cshrc: Simplify and automate the setting of FOAM_INST_DIR
FOAM_INST_DIR is the location of the OpenFOAM installation which defaults to
the directory containing the etc/bashrc,cshrc file.  If this default is
not appropriate FOAM_INST_DIR can be set explicitly.
2016-06-06 17:20:10 +01:00
Henry Weller
1d8ef28cb8 foamEtcFile: Add support for openfoamdev 2015-10-26 17:35:27 +00:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
Mark Olesen
d8a812ced1 ENH: add '-all' option to foamEtcFile for similar results as findEtcFiles 2011-07-14 11:26:42 +02:00
Mark Olesen
22fae65263 BUG: FOAM_INST_DIR (or prefix) not passed correctly from foamExec 2011-04-28 15:33:38 +02:00
Mark Olesen
debb4b42fd ENH: add foamEtcFile -silent option to suppress stderr
- need to trap possibly weird input within etc/bashrc, etc/cshrc and
  can't easily redirect stderr in csh.
2011-04-27 16:55:32 +02:00
Mark Olesen
9cbc0efca3 ENH: add support for WM_PROJECT_SITE env variable
- alternative to WM_PROJECT_INST_DIR/site for systems with locked down
  installation paths (eg, when packaged as RPM or deb)

  When "$WM_PROJECT_SITE" is defined, it is used in favour of
  "$WM_PROJECT_INST_DIR/site"
2011-03-11 18:32:18 +01:00
Mark Olesen
56e07de724 STYLE: changed some missed doxygen '@' to '\' 2011-02-14 10:00:48 +01:00
andy
14d1300a36 Revert "STyLE: More 2011 copyright dates (non-code)."
This reverts commit 2e1e671d96.
2011-01-05 18:25:32 +00:00
graham
2e1e671d96 STyLE: More 2011 copyright dates (non-code). 2011-01-05 11:48:24 +00:00
Mark Olesen
48696bdb45 ENH: silently remove leading ~OpenFOAM/ in bin/foamEtcFile
- makes it easier to cut-and-paste from dictionary contents that use
  the Foam::findEtcFile expansion
2010-07-12 11:48:24 +02:00
Mark Olesen
43407380f9 ENH: improve debian handling in foamEtcFile
- remove all corresponding logic from foamExec
2010-07-06 16:33:25 +02:00
Mark Olesen
fd0bcbb480 Merge remote branch 'OpenCFD/master' into olesenm
Conflicts:
	bin/foamExec
2010-07-06 14:30:30 +02:00
Mark Olesen
9745b86ef3 ENH: improve foamEtcFile handling (-prefix, -version options)
- This lets foamExec use foamEtcFile as well, but debian packaging
  still needs some work
2010-07-06 14:01:15 +02:00
Mark Olesen
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
Mark Olesen
f1d03a3802 ENH: cleanup shell scripts, BUG: unclosed 'if' in inlineReplace 2010-03-23 14:05:51 +01:00
mattijs
f65fe3244a BUG: foamEtcFile cannot use 'case' inside $( ) construct.
Reverted to using additional variable.
2010-03-22 17:33:56 +00:00
Mark Olesen
3ee8595169 ENH: add -m <mode> option to foamEtcFile to allow chaining.
For example, within the user ~/.OpenFOAM/<VER>/prefs.sh:

    foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile -m go prefs.sh` \
        && _foamSource $foamPrefs

could be used to write a personal adjustment that also includes the
site-wide prefs.
2010-03-19 13:06:49 +01:00
Mark Olesen
07283ff315 ENH: add -builtin option to paraFoam (VTK builtin OpenFOAM reader)
- Also adjusted formatting of usage to match what argList generates
2010-02-05 08:36:44 +01:00
Mark Olesen
dfd42b6b4a new script - foamEtcFile
- Locate user/site/shipped file with the semantics used in the
  ~OpenFOAM/fileName expansion
2009-07-23 20:26:40 +02:00