Altered doc-cp to ensure that dest dir will always exist
parent
d2bda9c492
commit
ecfa482898
|
@ -38,7 +38,8 @@ dest="$( sstrip "$2" )"
|
|||
# the problem of naming conflicts and maintains the illusion of url rewriting
|
||||
# using only the filesystem
|
||||
[ -d "$( sstrip "$1" )" ] \
|
||||
&& ( test -d "$dest" || mkdir -p "$dest" ) \
|
||||
&& dest="$dest/index.html"
|
||||
|
||||
cp -v "$1" "$dest"
|
||||
dir="${dest%/*}"
|
||||
( test -d "$dir" || mkdir -p "$dir" ) \
|
||||
&& cp -v "$1" "$dest"
|
||||
|
|
Loading…
Reference in New Issue