openfoam/wmake/scripts/makeTargetDir
2019-12-23 09:49:23 +00:00

32 lines
1.0 KiB
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, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# Script
# makeTargetDir
#
# Description
# Makes a directory hierarchy for the given target file
#
# Usage: makeTargetDir <file>
#
#------------------------------------------------------------------------------
for target
do
dir=${target%/*}
[ -d "$dir" ] || [ "$dir" = "$target" ] || mkdir -p "$dir"
done
#------------------------------------------------------------------------------