Skip to content
Snippets Groups Projects
Commit f92862a4 authored by Henry Weller's avatar Henry Weller
Browse files

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
parent 7a2eb638
No related merge requests found
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . wmake/scripts/AllwmakeParseArguments
# Perform various checks
wmakeCheckPwd "$WM_PROJECT_DIR" || { wmakeCheckPwd "$WM_PROJECT_DIR" || {
echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR" echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR"
echo " The environment variables are inconsistent with the installation." echo " The environment variables are inconsistent with the installation."
......
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . ../wmake/scripts/AllwmakeParseArguments
# Perform various checks
wmakeCheckPwd "$WM_PROJECT_DIR/applications" || { wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/applications" echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/applications"
echo " The environment variables are inconsistent with the installation." echo " The environment variables are inconsistent with the installation."
......
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . ../wmake/scripts/AllwmakeParseArguments
# Perform various checks
wmakeCheckPwd "$WM_PROJECT_DIR/src" || { wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/src" echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR/src"
echo " The environment variables are inconsistent with the installation." echo " The environment variables are inconsistent with the installation."
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
...@@ -34,6 +34,15 @@ ...@@ -34,6 +34,15 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
Script=${0##*/} 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() { usage() {
exec 1>&2 exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done while [ "$#" -ge 1 ]; do echo "$1"; shift; done
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment