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.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/ob-installdocs.sh b/src/ob-installdocs.sh
index 663a29f..cf3aae3 100644
--- a/src/ob-installdocs.sh
+++ b/src/ob-installdocs.sh
@@ -36,27 +36,31 @@ main()
if [ ${?} -ne 0 ]; then
ob_error "$(ob_get_msg 'cant_get_doc_pkg')"
fi
+ doc_pkg_doc_dir="$(ob_get_system_path 'package-docs' \
+ "${doc_pkg}" "${OB_BINARY_VERSION}")"
for pkg in $(ob_get_binary_packages); do
- doc_dir="${pkg}.data/usr/share/doc/${pkg}"
- mkdir -p "${doc_dir}" || \
+ doc_dir="$(ob_get_system_path 'package-docs' \
+ "${pkg}" "${OB_BINARY_VERSION}")"
+ data_doc_dir="${pkg}.data/${doc_dir}"
+ mkdir -p "${data_doc_dir}" || \
ob_error "$(ob_get_msg 'cant_make_doc_dir')"
if [ "${pkg}" = "${doc_pkg}" ]; then
ob_info "$(ob_get_msg 'installing_docs')" "${pkg}"
ob_get_doc_files | while read src dest; do
if [ -f "${src}" ]; then
- mkdir -p "${doc_dir}/${dest%/*}" || \
+ mkdir -p "${data_doc_dir}/${dest%/*}" || \
ob_error "$(ob_get_msg 'cant_make_doc_dir')"
- cp -R "${src}" "${doc_dir}/${dest}" || \
+ cp -R "${src}" "${data_doc_dir}/${dest}" || \
ob_error "$(ob_get_msg 'cant_cp_doc_file')" "${src}"
elif [ -d "${src}" ]; then
- cp -R "${src}/." "${doc_dir}/${dest}" || \
+ cp -R "${src}/." "${data_doc_dir}/${dest}" || \
ob_error "$(ob_get_msg 'cant_cp_doc_file')" "${src}"
fi
done
else
ob_info "$(ob_get_msg 'linking_docs')" "${pkg}"
- ln -s "/usr/share/doc/${doc_pkg}" "${doc_dir}" || \
+ ln -s "${doc_pkg_doc_dir}" "${data_doc_dir}" || \
ob_error "$(ob_get_msg 'cant_ln_doc_dir')"
fi
done