diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/package.sh | 30 | ||||
-rw-r--r-- | lib/package/2.sh | 42 |
2 files changed, 72 insertions, 0 deletions
diff --git a/lib/package.sh b/lib/package.sh index 7bfec63..d4c9c5d 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -271,6 +271,36 @@ ob_get_binary_parameter() return ${?} } +ob_get_doc_package() +{ + _ob_local + + if [ ${#} -gt 0 ]; then + _ob_return 125 + return ${?} + fi + + _ob_package_do 'get_doc_package' + + _ob_return ${?} + return ${?} +} + +ob_get_doc_files() +{ + _ob_local + + if [ ${#} -gt 0 ]; then + _ob_return 125 + return ${?} + fi + + _ob_package_do 'get_doc_files' + + _ob_return ${?} + return ${?} +} + ob_summarize_package_arch() { _ob_local 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 ${?} +} |