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.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ob-installdocs.sh b/src/ob-installdocs.sh
index 4123432..4cc522c 100644
--- a/src/ob-installdocs.sh
+++ b/src/ob-installdocs.sh
@@ -42,11 +42,11 @@ main()
for pkg in ${OPK_PACKAGES}; do
doc_dir="$(ob_get_system_path 'package-docs' \
"${pkg}" "${OPK_BINARY_VERSION}")"
- data_doc_dir="${pkg}.data/${doc_dir}"
- mkdir -p "${data_doc_dir}" || \
- ob_error "$(ob_get_msg 'cant_make_doc_dir')"
+ data_doc_dir="${pkg}.data/${doc_dir%/}"
if [ "${pkg}" = "${doc_pkg}" ]; then
ob_info "$(ob_get_msg 'installing_docs')" "${pkg}"
+ mkdir -p "${data_doc_dir}" || \
+ ob_error "$(ob_get_msg 'cant_make_doc_dir')"
ob_get_doc_files | while read src dest; do
if [ -f "${src}" ]; then
if [ "${dest%/*}" != "${dest}" ]; then
@@ -66,6 +66,8 @@ main()
done
else
ob_info "$(ob_get_msg 'linking_docs')" "${pkg}"
+ mkdir -p "${data_doc_dir%/*}" || \
+ ob_error "$(ob_get_msg 'cant_make_doc_dir')"
ln -s "${doc_pkg_doc_dir}" "${data_doc_dir}" || \
ob_error "$(ob_get_msg 'cant_ln_doc_dir')"
fi