From c336800ca4288ce174f183de20cd1fdef2b37141 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 16 Jun 2013 13:23:39 -0400 Subject: [PATCH] :Corrected dest dir creation bug with doc-cp The modification that created this bug was clearly not tested. --- tools/doc-cp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/doc-cp b/tools/doc-cp index bacf4f8..d0b6a05 100755 --- a/tools/doc-cp +++ b/tools/doc-cp @@ -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"