summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-20 13:00:56 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-20 13:00:56 (EDT)
commiteb73703f17c8763eed28af56cb10b280cbb86f18 (patch)
treead3affd9942081880ab89e0e9c10257b332b1dd9
parent7bda81736cf03e02a79cba7621b6a040f30b7c4d (diff)
Fix creation of documentation directories.
Before: $ ls -l usr/share/doc total 4 drwxr-xr-x 2 pj pj 4096 Oct 19 23:24 fakeroot-doc $ ls -l usr/share/doc/fakeroot-doc total 0 lrwxrwxrwx 1 pj pj 23 Oct 19 23:24 fakeroot -> /usr/share/doc/fakeroot After: $ ls -l usr/share/doc total 0 lrwxrwxrwx 1 pj pj 23 Oct 20 12:58 fakeroot-doc -> /usr/share/doc/fakeroot $ ls -l usr/share/doc/fakeroot-doc lrwxrwxrwx 1 pj pj 23 Oct 20 12:58 usr/share/doc/fakeroot-doc -> /usr/share/doc/fakeroot
-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