diff options
author | P. J. McDermott <pjm@nac.net> | 2012-10-04 13:39:43 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-10-04 13:39:43 (EDT) |
commit | abb13b216f7e8f7639d7dc0233046f9e7f1a924c (patch) | |
tree | 097715dbdf95ad3ef681ea346546c825cd92ba6d /lib/package | |
parent | a0342a14350b1df59575c45b3b3d51f2338d87e2 (diff) |
Implement ob_get_doc_{package,files}().
Diffstat (limited to 'lib/package')
-rw-r--r-- | lib/package/2.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/package/2.sh b/lib/package/2.sh index 7569bc7..775a4dd 100644 --- a/lib/package/2.sh +++ b/lib/package/2.sh @@ -106,3 +106,45 @@ _ob_binfield_2() _ob_return 0 return ${?} } + +_ob_get_doc_package_2() +{ + _ob_local _obgdp2_pkg _obgdp2_doc_pkg + + for _obgdp2_pkg in $(ob_get_binary_packages); do + if [ -r "${_OB_PACKAGE_DIR}/${_obgdp2_pkg}.pkg/docs" ]; then + if [ -n "${_obgdp2_doc_pkg}" ]; then + _ob_return 1 + return ${?} + fi + _obgdp2_doc_pkg="${_obgdp2_pkg}" + fi + done + + echo "${_obgdp2_pkg}" + + _ob_return 0 + return ${?} +} + +_ob_get_doc_files_2() +{ + _ob_local _obgdf2_doc_pkg + + _obgdf2_doc_pkg="$(_ob_get_doc_package_2)" + + if [ ${?} -ne 0 ]; then + _ob_return 1 + return ${?} + fi + + cat <<EOF +../copyright +../changelog changelog.dist +../README README.dist +EOF + cat "${_OB_PACKAGE_DIR}/${_obgdp2_doc_pkg}.pkg/docs" + + _ob_return 0 + return ${?} +} |