mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: have wmake and wclean do something sensible with a filename as target
- For convenience, let "wmake some/path/filename.C" behave similar to "wmake some/path" and trace back for the Make directory.
This commit is contained in:
@ -100,10 +100,13 @@ MakeDir=Make
|
||||
|
||||
if [ $# -ge 1 ]
|
||||
then
|
||||
|
||||
if [ -d "$1" ]
|
||||
then
|
||||
dir=$1
|
||||
elif [ -f "$1" ]
|
||||
then
|
||||
dir="${1%/*}"
|
||||
: ${dir:=.}
|
||||
else
|
||||
targetType=$1
|
||||
fi
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
# \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM.
|
||||
@ -250,7 +250,11 @@ if [ $# -ge 1 ]
|
||||
then
|
||||
if [ -d "$1" ]
|
||||
then
|
||||
dir=$1
|
||||
dir="$1"
|
||||
elif [ -f "$1" ]
|
||||
then
|
||||
dir="${1%/*}"
|
||||
: ${dir:=.}
|
||||
else
|
||||
targetType=$1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user