From eb73703f17c8763eed28af56cb10b280cbb86f18 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 20 Oct 2012 13:00:56 -0400 Subject: 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 --- 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 -- cgit v0.9.1