ENH: default jobControl now under the '~/.OpenFOAM/jobControl' directory

- this implies that jobControl is a user-resource for OpenFOAM.
  It was previously located under $WM_PROJECT_INST_DIR/jobControl,
  but few users will have write access there.

- an unset FOAM_JOB_DIR variable is treated as "~/.OpenFOAM/jobControl",
  which can partially reduce environment clutter.

- provide argList::noJobInfo() to conveniently suppress job-info on an
  individual basis for short-running utilities (eg, foamListTimes) to
  avoid unneeded clutter.
This commit is contained in:
Mark Olesen
2017-04-03 08:28:15 +02:00
parent c341b22f9d
commit af49eaf625
14 changed files with 133 additions and 122 deletions

View File

@ -36,7 +36,6 @@
# file yet. Not supported by this script yet)
#
#------------------------------------------------------------------------------
Script=${0##*/}
#-------------------------------------------------------------------------------
@ -52,6 +51,8 @@ TMPFILE=/tmp/${Script}$$.tmp
MACHDIR=$HOME/.OpenFOAM/${Script}
DEFSTATEFILE=$HOME/.OpenFOAM/foamCheckJobs.out
# The default is "~/.OpenFOAM/jobControl"
: ${FOAM_JOB_DIR:=$HOME/.OpenFOAM/jobControl}
if [ `uname -s` = Linux ]
then
@ -77,7 +78,7 @@ The output from checking all running jobs is collected in an optional
file.
FILES:
\$FOAM_JOB_DIR/runningJobs locks for running processes
\$FOAM_JOB_DIR/runningJobs locks for running processes
/finishedJobs locks for finished processes
USAGE
exit 1
@ -196,13 +197,6 @@ fi
#- Check a few things
if [ ! "$FOAM_JOB_DIR" ]
then
echo "$Script : FOAM_JOB_DIR environment variable not set."
echo
exit 1
fi
if [ ! -d "$FOAM_JOB_DIR" ]
then
echo "$Script : directory does not exist."

View File

@ -34,6 +34,8 @@ Script=${0##*/}
JOBSTRING='%4s %8s %20s %10s %8s %4s %12s %12s %20s\n'
DEFSTATEFILE=$HOME/.OpenFOAM/foamCheckJobs.out
# The default is "~/.OpenFOAM/jobControl"
: ${FOAM_JOB_DIR:=$HOME/.OpenFOAM/jobControl}
#-------------------------------------------------------------------------------
#
@ -120,12 +122,6 @@ fi
#- Check a few things
if [ ! "$FOAM_JOB_DIR" ]
then
echo "$Script : FOAM_JOB_DIR environment variable not set."
echo
exit 1
fi
if [ ! -d "$FOAM_JOB_DIR" ]
then
echo "$Script : directory does not exist."