1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/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
#------------------------------------------------------------------------------
|