summaryrefslogtreecommitdiffstats
path: root/src/ob-installdocs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/ob-installdocs.sh')
-rw-r--r--src/ob-installdocs.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ob-installdocs.sh b/src/ob-installdocs.sh
index cc3453a..f8abaa6 100644
--- a/src/ob-installdocs.sh
+++ b/src/ob-installdocs.sh
@@ -49,11 +49,17 @@ main()
ob_info "$(ob_get_msg 'installing_docs')" "${pkg}"
ob_get_doc_files | while read src dest; do
if [ -f "${src}" ]; then
- mkdir -p "${data_doc_dir}/${dest%/*}" || \
- ob_error "$(ob_get_msg 'cant_make_doc_dir')"
+ if [ "${dest%/*}" != "${dest}" ]; then
+ mkdir -p "${data_doc_dir}/${dest%/*}" || \
+ ob_error "$(ob_get_msg 'cant_make_doc_dir')"
+ fi
cp -R "${src}" "${data_doc_dir}/${dest}" || \
ob_error "$(ob_get_msg 'cant_cp_doc_file')" "${src}"
elif [ -d "${src}" ]; then
+ if [ "${dest%/*}" != "${dest}" ]; then
+ mkdir -p "${data_doc_dir}/${dest%/*}" || \
+ ob_error "$(ob_get_msg 'cant_make_doc_dir')"
+ fi
cp -R "${src}/." "${data_doc_dir}/${dest}" || \
ob_error "$(ob_get_msg 'cant_cp_doc_file')" "${src}"
fi