Commit c8a7f46d authored by Mark Olesen's avatar Mark Olesen

STYLE: regularize quoting and exit on failed 'cd'

parent e51f92f2
......@@ -3,10 +3,11 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2017 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
......@@ -22,7 +23,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
......@@ -61,39 +63,48 @@ for i in \
gmp-* mpfr-* mpc-* gcc-* llvm-* \
;
do
[ -d "$i" ] && (
if [ -d "$i" ]
then
(
echo
echo "${i%/*}"
echo " make distclean"
echo
cd $i && make distclean
)
fi
done
# Clean various packages via 'realclean'
for i in scotch*/src
do
[ -d "$i" ] && (
if [ -d "$i" ]
then
(
echo
echo "${i%/*}"
echo " make realclean"
echo
cd $i && make realclean
)
fi
done
# Clean various packages via 'wclean'
for i in libccmio*/Make kahip*/lib/Make
do
[ -d "$i" ] && (
if [ -d "$i" ]
then
(
echo
echo "${i%/Make}"
echo " wclean"
echo
cd ${i%/Make} && wclean
)
fi
done
......@@ -117,7 +128,7 @@ removePlatform()
then
echo
echo "Cleaning platform '$platform'"
\rm -rf "platforms/$platform"
rm -rf "platforms/$platform"
else
echo
echo "Platform '$platform' not built"
......@@ -138,7 +149,7 @@ do
echo
echo "Removing all platforms/sub-directories"
echo
\rm -rf platforms/*
rm -rf platforms/*
break
;;
......
......@@ -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-2016 OpenFOAM Foundation
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -22,7 +23,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
......
......@@ -3,9 +3,11 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 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/>.
......@@ -33,7 +35,8 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party (parent) directory only
# Run from third-party directory only
cd "${0%/*}" || exit
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
......
......@@ -3,9 +3,11 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 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/>.
......@@ -31,7 +33,8 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party (parent) directory only
# Run from third-party directory only
cd "${0%/*}" || exit
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
......
......@@ -3,10 +3,11 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# | Copyright (C) 2011 OpenFOAM Foundation
# Copyright (C) 2011 OpenFOAM Foundation
# Copyright (C) 2016-2017 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -21,7 +22,8 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party (parent) directory only
# Run from third-party directory only
cd "${0%/*}" || exit
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
......
......@@ -2,10 +2,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-2016 OpenFOAM Foundation
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -85,7 +86,7 @@ setParaViewDirs()
echo "ParaView_BUILD_DIR=$ParaView_BUILD_DIR"
echo "ParaView_DIR=$ParaView_DIR"
export GIT_DIR=$ParaView_SOURCE_DIR/.git # Mask seeing our own git-repo
export GIT_DIR="$ParaView_SOURCE_DIR/.git" # Mask seeing our own git-repo
}
......@@ -396,7 +397,7 @@ configParaView()
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
cd "$ParaView_BUILD_DIR" || exit # Change to build folder
echo "----"
echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)"
......@@ -434,7 +435,7 @@ configParaView()
#
makeParaView()
{
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
cd "$ParaView_BUILD_DIR" || exit # Change to build folder
echo " Starting make"
time make -j $WM_NCOMPPROCS
echo " Done make"
......@@ -453,7 +454,7 @@ makeParaView()
#
installParaView()
{
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
cd "$ParaView_BUILD_DIR" || exit # Change to build folder
echo " Installing ParaView to $ParaView_DIR"
make install
......
......@@ -2,10 +2,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-2016 OpenFOAM Foundation
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -738,7 +739,7 @@ applyPatch()
if [ -r "$patch" ]
then
(
cd $dst || exit 1
cd "$dst" || exit
if [ -f "$sentinel" ]
then
echo "patch for $pkg was already applied"
......
......@@ -2,9 +2,11 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
......@@ -65,7 +67,7 @@ setVtkDirs()
echo "VTK_BUILD_DIR=$VTK_BUILD_DIR"
echo "VTK_DIR=$VTK_DIR"
export GIT_DIR=$VTK_SOURCE_DIR/.git # Mask seeing our own git-repo
export GIT_DIR="$VTK_SOURCE_DIR/.git" # Mask seeing our own git-repo
}
......@@ -120,7 +122,7 @@ configVTK()
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
cd $VTK_BUILD_DIR || exit 1 # change to build folder
cd "$VTK_BUILD_DIR" || exit # change to build folder
echo "----"
echo "Configuring VTK-$VTK_VERSION"
......@@ -176,7 +178,7 @@ addMpiSupport()
#
makeVTK()
{
cd $VTK_BUILD_DIR || exit 1 # Change to build folder
cd "$VTK_BUILD_DIR" || exit # Change to build folder
echo " Starting make"
time make -j $WM_NCOMPPROCS
......@@ -193,7 +195,7 @@ makeVTK()
#
installVTK()
{
cd $VTK_BUILD_DIR || exit 1 # Change to build folder
cd "$VTK_BUILD_DIR" || exit # Change to build folder
echo " Installing VTK to $VTK_DIR"
make install
......
......@@ -3,9 +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) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
......@@ -20,7 +22,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
......@@ -119,7 +122,7 @@ adjustADIOS()
{
# Rename libraries according to FOAM_MPI
(
cd $ADIOS1_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH || exit 1
cd "$ADIOS1_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" || exit
if [ "$FOAM_MPI" != dummy ]
then
......@@ -272,8 +275,8 @@ then
# ----------------------------
buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS1_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$ADIOS1_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null
......@@ -320,8 +323,8 @@ else
echo
(
buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS1_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$ADIOS1_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
applyPatch $adiosPACKAGE $ADIOS1_SOURCE_DIR
......@@ -355,6 +358,7 @@ else
&& listMethods
) || {
echo "Error building: $adiosPACKAGE"
exit 1
}
fi
......
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# This file is part of OpenFOAM, licensed under the GNU General Public License
# <http://www.gnu.org/licenses/>.
# Copyright (C) 2018-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# Script
# makeAdios2
......@@ -37,7 +39,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
......@@ -138,8 +141,8 @@ else
echo
(
buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS2_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$ADIOS2_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
applyPatch $adiosPACKAGE $ADIOS2_SOURCE_DIR
......
......@@ -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-2016 OpenFOAM Foundation
# Copyright (C) 2011-2016 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 @@
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
# 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
......@@ -125,8 +127,8 @@ install()
echo "Starting build: $ccmioPACKAGE ($targetType)"
echo
(
cd $CCMIO_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$CCMIO_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $CCMIO_ARCH_PATH
rm -f $FOAM_EXT_LIBBIN/libccmio$EXT_SO
......
......@@ -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) 2012-2016 OpenFOAM Foundation
# Copyright (C) 2012-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -58,7 +59,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
......@@ -236,8 +238,8 @@ else
# Configuration options:
unset buildOpt
cd $BOOST_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$BOOST_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $BOOST_ARCH_PATH
......@@ -462,8 +464,8 @@ fi
fi
mkdir -p $CGAL_BUILD_DIR
cd $CGAL_BUILD_DIR || exit 1
export GIT_DIR=$CGAL_SOURCE_DIR/.git # Mask seeing our own git-repo
cd "$CGAL_BUILD_DIR" || exit
export GIT_DIR="$CGAL_SOURCE_DIR/.git" # Mask seeing our own git-repo
unset configBoost configGmp configMpfr
echo "----"
......
......@@ -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
......
......@@ -3,9 +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) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
......@@ -38,7 +40,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
......@@ -140,8 +143,8 @@ else
# ----------------------------
buildDIR=$buildBASE/$fftwPACKAGE
cd $FFTW_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$FFTW_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $FFTW_ARCH_PATH
rm -rf $buildDIR
......
......@@ -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-2016 OpenFOAM Foundation
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -34,7 +35,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
......@@ -191,8 +193,8 @@ else
sourceDIR=$sourceBASE/$gmpPACKAGE
buildDIR=$buildBASE/$gmpPACKAGE
cd $sourceDIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$sourceDIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR
......@@ -243,8 +245,8 @@ else
sourceDIR=$sourceBASE/$mpfrPACKAGE
buildDIR=$buildBASE/$mpfrPACKAGE
cd $sourceDIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$sourceDIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR
......@@ -299,8 +301,8 @@ else
sourceDIR=$sourceBASE/$mpcPACKAGE
buildDIR=$buildBASE/$mpcPACKAGE
cd $sourceDIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$sourceDIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR
......@@ -355,8 +357,8 @@ else
sourceDIR=$sourceBASE/$gccPACKAGE
buildDIR=$buildBASE/$gccPACKAGE
cd $sourceDIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$sourceDIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR
......
......@@ -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) 2012 OpenFOAM Foundation
# Copyright (C) 2012 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -22,7 +23,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
......@@ -102,8 +104,8 @@ else
(
buildDIR=$buildBASE/$gperftoolsPACKAGE
cd $GPERFTOOLS_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$GPERFTOOLS_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $GPERFTOOLS_ARCH_PATH
......
......@@ -3,9 +3,11 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2018-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
......@@ -49,7 +51,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
......@@ -149,8 +152,8 @@ echo
# Configuration options:
unset configOpt
cd $HYPRE_SOURCE_DIR/src || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$HYPRE_SOURCE_DIR/src" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $HYPRE_ARCH_PATH
[ -e Makefile ] && make distclean 2>/dev/null
......
......@@ -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/>.
......@@ -49,7 +51,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
......@@ -181,11 +184,11 @@ then
echo "Starting build: $kahipPACKAGE ($targetType) using wmake"
echo
cd $KAHIP_SOURCE_DIR/lib || exit 1
export GIT_DIR=$KAHIP_SOURCE_DIR/.git # Mask seeing our own git-repo
cd "$KAHIP_SOURCE_DIR/lib" || exit
export GIT_DIR="$KAHIP_SOURCE_DIR/.git" # Mask seeing our own git-repo
rm -rf $KAHIP_ARCH_PATH
rm -f $FOAM_EXT_LIBBIN/libkahip$EXT_SO
rm -rf "$KAHIP_ARCH_PATH"
rm -f "$FOAM_EXT_LIBBIN/libkahip$EXT_SO"
libdir=$KAHIP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
......
......@@ -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-2016 OpenFOAM Foundation
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
......@@ -40,7 +41,8 @@