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:
3
Allwmake
3
Allwmake
@ -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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / 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 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user