diff --git a/bin/foamLog b/bin/foamLog index 2603832309..cd68971205 100755 --- a/bin/foamLog +++ b/bin/foamLog @@ -29,7 +29,7 @@ # Extract data for each time-step from a log file for graphing. # # Environment -# WM_PROJECT_API +# FOAM_API # WM_PROJECT_DIR # WM_PROJECT_SITE # @@ -90,9 +90,9 @@ cat </etc/ -if [ -n "$WM_PROJECT" ] +# check projectDir/etc/ +if [ -n "$WM_PROJECT_DIR" ] then for i in \ - "$HOME/.$WM_PROJECT/$WM_PROJECT_API" \ + "$HOME/.$WM_PROJECT/$FOAM_API" \ "$HOME/.$WM_PROJECT" \ "$WM_PROJECT_DIR/etc" \ ; diff --git a/bin/tools/change-sitedir.sh b/bin/tools/change-sitedir.sh index f66504a225..da98240883 100644 --- a/bin/tools/change-sitedir.sh +++ b/bin/tools/change-sitedir.sh @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -46,7 +46,7 @@ # # corresponds to the standard site location: # -# $WM_PROJECT_DIR/site{/$WM_PROJECT_API/platforms/$WM_OPTIONS} +# $WM_PROJECT_DIR/site{/$FOAM_API/platforms/$WM_OPTIONS} # #------------------------------------------------------------------------------ diff --git a/etc/bashrc b/etc/bashrc index 6deffbdf4d..630328a4f0 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -22,9 +22,9 @@ # - $WM_PROJECT_DIR/etc/prefs.sh # # - User or group values (first file found): -# - ~/.OpenFOAM/$WM_PROJECT_API/prefs.sh +# - ~/.OpenFOAM/$FOAM_API/prefs.sh # - ~/.OpenFOAM/prefs.sh -# - $WM_PROJECT_SITE/$WM_PROJECT_API/etc/prefs.sh +# - $WM_PROJECT_SITE/$FOAM_API/etc/prefs.sh # - $WM_PROJECT_SITE/etc/prefs.sh # # Environment diff --git a/etc/config.csh/settings b/etc/config.csh/settings index ac09ece5bd..0fdf93f8d1 100644 --- a/etc/config.csh/settings +++ b/etc/config.csh/settings @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -183,11 +183,11 @@ endif setenv PATH "${WM_PROJECT_DIR}/bin:${PATH}" # Prepend site-specific scripts to path - only if they exist -if ( -d "$siteDir/bin" ) then # Generic +if ( -d "$siteDir/bin" ) then # Generic _foamAddPath "$siteDir/bin" endif -if ( -d "$siteDir/$WM_PROJECT_API/bin" ) then # API-specific - _foamAddPath "$siteDir/$WM_PROJECT_API/bin" +if ( -d "$siteDir/$FOAM_API/bin" ) then # API-specific + _foamAddPath "$siteDir/$FOAM_API/bin" endif # OpenFOAM executables (user, group, standard) diff --git a/etc/config.csh/setup b/etc/config.csh/setup index a1152d8a74..9b06d1818e 100644 --- a/etc/config.csh/setup +++ b/etc/config.csh/setup @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -24,8 +24,8 @@ # #------------------------------------------------------------------------------ -# [WM_PROJECT_API] - The API level for the project -setenv WM_PROJECT_API `$WM_PROJECT_DIR/bin/foamEtcFile -show-api` +# [FOAM_API] - The API level for the project +setenv FOAM_API `$WM_PROJECT_DIR/bin/foamEtcFile -show-api` # The installation parent directory set prefixDir="${WM_PROJECT_DIR:h}" @@ -51,8 +51,8 @@ _foamEcho "Locating ThirdParty directory" foreach foamDir (\ "$WM_PROJECT_DIR/ThirdParty" \ "$prefixDir/ThirdParty-$WM_PROJECT_VERSION" \ - "$prefixDir/ThirdParty-v$WM_PROJECT_API" \ - "$prefixDir/ThirdParty-$WM_PROJECT_API" \ + "$prefixDir/ThirdParty-v$FOAM_API" \ + "$prefixDir/ThirdParty-$FOAM_API" \ "$prefixDir/ThirdParty-common" \ ) _foamEcho "... $foamDir" diff --git a/etc/config.sh/settings b/etc/config.sh/settings index c0ea5654aa..31a4d2138c 100644 --- a/etc/config.sh/settings +++ b/etc/config.sh/settings @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -180,13 +180,13 @@ fi export PATH="$WM_PROJECT_DIR/bin:$PATH" # Prepend site-specific scripts to path - only if they exist -if [ -d "$siteDir/bin" ] # Generic +if [ -d "$siteDir/bin" ] # Generic then _foamAddPath "$siteDir/bin" fi -if [ -d "$siteDir/$WM_PROJECT_API/bin" ] # API-specific +if [ -d "$siteDir/$FOAM_API/bin" ] # API-specific then - _foamAddPath "$siteDir/$WM_PROJECT_API/bin" + _foamAddPath "$siteDir/$FOAM_API/bin" fi # OpenFOAM executables (user, group, standard) diff --git a/etc/config.sh/setup b/etc/config.sh/setup index 40ab0012f7..6767335218 100644 --- a/etc/config.sh/setup +++ b/etc/config.sh/setup @@ -24,8 +24,8 @@ # #------------------------------------------------------------------------------ -# [WM_PROJECT_API] - The API level for the project -export WM_PROJECT_API="$($WM_PROJECT_DIR/bin/foamEtcFile -show-api)" +# [FOAM_API] - The API level for the project +export FOAM_API="$($WM_PROJECT_DIR/bin/foamEtcFile -show-api)" # The installation parent directory prefixDir="${WM_PROJECT_DIR%/*}" @@ -52,8 +52,8 @@ _foamEcho "Locating ThirdParty directory" for WM_THIRD_PARTY_DIR in \ "$WM_PROJECT_DIR/ThirdParty" \ "$prefixDir/ThirdParty-$WM_PROJECT_VERSION" \ - "$prefixDir/ThirdParty-v$WM_PROJECT_API" \ - "$prefixDir/ThirdParty-$WM_PROJECT_API" \ + "$prefixDir/ThirdParty-v$FOAM_API" \ + "$prefixDir/ThirdParty-$FOAM_API" \ "$prefixDir/ThirdParty-common" \ ; do diff --git a/etc/cshrc b/etc/cshrc index 5fabac3903..cb2f51e6c7 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -22,9 +22,9 @@ # - $WM_PROJECT_DIR/etc/prefs.csh # # - User or group values (first file found): -# - ~/.OpenFOAM/$WM_PROJECT_API/prefs.csh +# - ~/.OpenFOAM/$FOAM_API/prefs.csh # - ~/.OpenFOAM/prefs.csh -# - $WM_PROJECT_SITE/$WM_PROJECT_API/etc/prefs.csh +# - $WM_PROJECT_SITE/$FOAM_API/etc/prefs.csh # - $WM_PROJECT_SITE/prefs.csh # # Environment diff --git a/wmake/wmakeScheduler b/wmake/wmakeScheduler index 08b05d5d52..0a92eaa0d8 100755 --- a/wmake/wmakeScheduler +++ b/wmake/wmakeScheduler @@ -4,7 +4,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2018-2019 OpenCFD Ltd. #------------------------------------------------------------------------------- # License # This file is part of OpenFOAM. @@ -44,20 +44,24 @@ # Sources the relevant cshrc/bashrc if not set. # # Environment +# - FOAM_API # - WM_PROJECT_DIR -# - WM_PROJECT -# - WM_PROJECT_API +# - WM_PROJECT (defaults to OpenFOAM) # #------------------------------------------------------------------------------- -Script=${0##*/} +Script="${0##*/}" -# csh sets HOST, bash sets HOSTNAME -: ${HOST:=$HOSTNAME} +# Default project +[ -n "$WM_PROJECT" ] || WM_PROJECT=OpenFOAM lockDir="$HOME/.$WM_PROJECT/.wmake" +# csh sets HOST, bash sets HOSTNAME +[ -n "$HOST" ] || HOST="$HOSTNAME" + # Fallback - 1 core on current host -: ${WM_HOSTS:=$HOST:1} +[ -n "$WM_HOSTS" ] || WM_HOSTS="${HOST}:1" + # Count the total number of slots available and exit if [ "$1" = "-count" ] @@ -90,13 +94,13 @@ esac # Same as foamEtcFile -mode=uo bashrc # -# Check ~/.$WM_PROJECT/$WM_PROJECT_API/ +# Check ~/.$WM_PROJECT/$FOAM_API/ # Check ~/.$WM_PROJECT/ # Check projectDir/etc/ -if [ -n "$WM_PROJECT" ] +if [ -n "$WM_PROJECT_DIR" ] then for i in \ - "$HOME/.$WM_PROJECT/$WM_PROJECT_API" \ + "$HOME/.$WM_PROJECT/$FOAM_API" \ "$HOME/.$WM_PROJECT" \ "$WM_PROJECT_DIR/etc" \ ; @@ -114,11 +118,11 @@ fi # Use FOAM_SETTINGS to pass command-line settings case "$sourceFoam" in */bashrc) - sourceFoam='[ -n "$WM_PROJECT" ] || '". $sourceFoam $FOAM_SETTINGS" + sourceFoam='[ -n "$WM_PROJECT_DIR" ] || '". $sourceFoam $FOAM_SETTINGS" ;; */cshrc) - sourceFoam='if ( ! $?WM_PROJECT ) source '"$sourceFoam $FOAM_SETTINGS" + sourceFoam='if ( ! $?WM_PROJECT_DIR ) source '"$sourceFoam $FOAM_SETTINGS" ;; esac diff --git a/wmake/wmakeSchedulerUptime b/wmake/wmakeSchedulerUptime index ec8d2e7248..2873d35d47 100755 --- a/wmake/wmakeSchedulerUptime +++ b/wmake/wmakeSchedulerUptime @@ -4,7 +4,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2018-2019 OpenCFD Ltd. #------------------------------------------------------------------------------- # License # This file is part of OpenFOAM. @@ -44,20 +44,24 @@ # Sources the relevant cshrc/bashrc if not set. # # Environment +# - FOAM_API # - WM_PROJECT_DIR -# - WM_PROJECT -# - WM_PROJECT_API +# - WM_PROJECT (defaults to OpenFOAM) # #------------------------------------------------------------------------------- -Script=${0##*/} +Script="${0##*/}" -# csh sets HOST, bash sets HOSTNAME -: ${HOST:=$HOSTNAME} +# Default project +[ -n "$WM_PROJECT" ] || WM_PROJECT=OpenFOAM lockDir="$HOME/.$WM_PROJECT/.wmake" +# csh sets HOST, bash sets HOSTNAME +[ -n "$HOST" ] || HOST="$HOSTNAME" + # Fallback - 1 core on current host -: ${WM_HOSTS:=$HOST:1} +[ -n "$WM_HOSTS" ] || WM_HOSTS="${HOST}:1" + # Count the total number of slots available and exit if [ "$1" = "-count" ] @@ -90,13 +94,13 @@ esac # Same as foamEtcFile -mode=uo bashrc # -# Check ~/.$WM_PROJECT/$WM_PROJECT_API/ +# Check ~/.$WM_PROJECT/$FOAM_API/ # Check ~/.$WM_PROJECT/ # Check projectDir/etc/ -if [ -n "$WM_PROJECT" ] +if [ -n "$WM_PROJECT_DIR" ] then for i in \ - "$HOME/.$WM_PROJECT/$WM_PROJECT_API" \ + "$HOME/.$WM_PROJECT/$FOAM_API" \ "$HOME/.$WM_PROJECT" \ "$WM_PROJECT_DIR/etc" \ ; @@ -114,11 +118,11 @@ fi # Use FOAM_SETTINGS to pass command-line settings case "$sourceFoam" in */bashrc) - sourceFoam='[ -n "$WM_PROJECT" ] || '". $sourceFoam $FOAM_SETTINGS" + sourceFoam='[ -n "$WM_PROJECT_DIR" ] || '". $sourceFoam $FOAM_SETTINGS" ;; */cshrc) - sourceFoam='if ( ! $?WM_PROJECT ) source '"$sourceFoam $FOAM_SETTINGS" + sourceFoam='if ( ! $?WM_PROJECT_DIR ) source '"$sourceFoam $FOAM_SETTINGS" ;; esac