Allwmake: Provides clearer message when OpenFOAM environment is not loaded

Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2424
This commit is contained in:
Henry Weller
2017-01-28 17:57:13 +00:00
parent 0dd9616dcf
commit 84f63ba979
4 changed files with 16 additions and 4 deletions

View File

@ -2,8 +2,9 @@
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
. wmake/scripts/AllwmakeParseArguments
# Perform various checks
wmakeCheckPwd "$WM_PROJECT_DIR" || {
echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR"
echo " The environment variables are inconsistent with the installation."

View File

@ -2,8 +2,9 @@
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
. ../wmake/scripts/AllwmakeParseArguments
# Perform various checks
wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/applications"
echo " The environment variables are inconsistent with the installation."

View File

@ -2,8 +2,9 @@
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
. ../wmake/scripts/AllwmakeParseArguments
# Perform various checks
wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/src"
echo " The environment variables are inconsistent with the installation."

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -34,6 +34,15 @@
#------------------------------------------------------------------------------
Script=${0##*/}
if [ -z "$WM_PROJECT_DIR" ]
then
echo "$Script error: The OpenFOAM environment is not set."
echo " Check the OpenFOAM entries in your dot-files and source them."
echo " If in doubt, please read:"
echo " http://openfoam.org/download/source/setting-environment"
exit 1
fi
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done