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:
14
makeCmake
14
makeCmake
@ -3,10 +3,11 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011 OpenFOAM Foundation
|
||||
# Copyright (C) 2011 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -25,7 +26,8 @@
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# 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
|
||||
@ -103,8 +105,8 @@ else
|
||||
(
|
||||
buildDIR=$buildBASE/$cmakePACKAGE
|
||||
|
||||
cd $CMAKE_SOURCE_DIR || exit 1
|
||||
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||
cd "$CMAKE_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
make distclean 2>/dev/null
|
||||
|
||||
rm -rf $buildDIR
|
||||
@ -125,7 +127,7 @@ fi
|
||||
if [ "$optLink" = true -a -x "$CMAKE_ARCH_PATH/bin/cmake" ]
|
||||
then
|
||||
(
|
||||
cd ${CMAKE_ARCH_PATH%/*} || exit 1
|
||||
cd "${CMAKE_ARCH_PATH%/*}" || exit
|
||||
if [ -L cmake-system ]
|
||||
then
|
||||
rm cmake-system
|
||||
|
||||
Reference in New Issue
Block a user