32 lines
1.0 KiB
Bash
Executable File
32 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
#------------------------------------------------------------------------------
|
|
# ========= |
|
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
# \\ / O peration |
|
|
# \\ / A nd |
|
|
# \\/ 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
|
|
|
|
#------------------------------------------------------------------------------
|