openfoam/wmake/scripts/makeTargetDir
Mark Olesen 90c4ee7e12 ENH: support wmakeLnInclude of C++ template files (.tcc, .tpp, .txx)
- can be used to avoid confusion with source files

ENH: improve handling of '--' option termination (wmake scripts)
2022-11-16 13:11:40 +01:00

31 lines
1021 B
Bash
Executable File

#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011 OpenFOAM Foundation
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# wmake/scripts/makeTargetDir
#
# Description
# Makes a directory hierarchy for the given target file(s)
#
# Usage: makeTargetDir file1 [..fileN]
#
#------------------------------------------------------------------------------
for target
do
dir="${target%/*}"
[ "$dir" = "$target" ] || [ -d "$dir" ] || mkdir -p "$dir"
done
#------------------------------------------------------------------------------