wmake.*: Improved robustness and portability using shellcheck

This commit is contained in:
Henry Weller
2018-05-03 21:49:07 +01:00
parent 08704a2d1f
commit 0cca225762
13 changed files with 158 additions and 157 deletions

View File

@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
@ -104,7 +104,7 @@ dirName="$1"
# Use /bin/pwd to get the absolute path (could be linked)
thisDir=$(/bin/pwd)
target=$(cd $dirName 2>/dev/null && /bin/pwd)
target=$(cd "$dirName" 2>/dev/null && /bin/pwd)
# Return 0 if this directory is <dir>
[ "$thisDir" = "$target" ] && exit 0