mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
STYLE: regularize quoting and exit on failed 'cd'
This commit is contained in:
11
makeOPENMPI
11
makeOPENMPI
@ -3,9 +3,11 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
@ -42,7 +44,8 @@ then
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
cd "${0%/*}" || exit
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
@ -171,8 +174,8 @@ else
|
||||
|
||||
buildDIR=$buildBASE/$mpiPACKAGE
|
||||
|
||||
cd $MPI_SOURCE_DIR || exit 1
|
||||
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||
cd "$MPI_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
[ -e Makefile ] && make distclean 2>/dev/null
|
||||
|
||||
rm -rf $MPI_ARCH_PATH
|
||||
|
||||
Reference in New Issue
Block a user