:Corrected dest dir creation bug with doc-cp

The modification that created this bug was clearly not tested.
master
Mike Gerwitz 2013-06-16 13:23:39 -04:00
parent 3ec175ef0c
commit c336800ca4
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ sstrip()
}
# ensure that parent directory exists
mkdir -p "${dest%/*}"
dir="${2%/*}"
[ -z "$dir" ] || mkdir -p "$dir"
dest="$( sstrip "$2" )"
cp -v "$1" "$dest"