summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-25 19:56:14 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-25 19:56:14 (EDT)
commitc06b1494a26f5274e72b04286cab28a5d0d7188d (patch)
tree99259942cb85e88f409824550a8795546019199c
parenta8ec0f66b4637cce5df13d1c9389ebb8b5e625cf (diff)
Make ob_get_doc_files() accept arch and plat args.
The contents of the changelog file might be made architecture-dependent by binary rebuilds. So prepare to make the file's pathname architecture-specific to support co-installation of multiple architectures.
-rw-r--r--lib/package.sh9
-rw-r--r--lib/package/2.sh10
-rw-r--r--src/ob-installdocs.sh3
3 files changed, 12 insertions, 10 deletions
diff --git a/lib/package.sh b/lib/package.sh
index 63d599a..8b4ee05 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -291,14 +291,17 @@ ob_get_doc_package()
ob_get_doc_files()
{
- _ob_local
+ _ob_local _obgdf_arch _obgdf_plat
- if [ ${#} -gt 0 ]; then
+ if [ ${#} -eq 2 ]; then
+ _obgdf_arch="${1}"
+ _obgdf_plat="${2}"
+ else
_ob_return 125
return ${?}
fi
- _ob_package_do 'get_doc_files'
+ _ob_package_do 'get_doc_files' "${_obgdf_arch}" "${_obgdf_plat}"
_ob_return ${?}
return ${?}
diff --git a/lib/package/2.sh b/lib/package/2.sh
index ad6750d..1c643ef 100644
--- a/lib/package/2.sh
+++ b/lib/package/2.sh
@@ -134,14 +134,12 @@ _ob_get_doc_package_2()
_ob_get_doc_files_2()
{
- _ob_local _obgdf2_doc_pkg
+ _ob_local _obgdf2_arch _obgdf2_plat _obgdf2_doc_pkg
- _obgdf2_doc_pkg="$(_ob_get_doc_package_2)"
+ _obgdf2_arch="${1}"
+ _obgdf2_plat="${2}"
- if [ ${?} -ne 0 ]; then
- _ob_return 1
- return ${?}
- fi
+ _obgdf2_doc_pkg="$(_ob_get_doc_package_2)"
cat <<-EOF
../copyright
diff --git a/src/ob-installdocs.sh b/src/ob-installdocs.sh
index 1e596e3..dfd5b70 100644
--- a/src/ob-installdocs.sh
+++ b/src/ob-installdocs.sh
@@ -50,7 +50,8 @@ main()
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
+ ob_get_doc_files "${OPK_HOST_ARCH}" "${OPK_HOST_PLAT}" | \
+ while read src dest; do
if [ -f "${src}" ]; then
if [ "${dest%/*}" != "${dest}" ]; then
mkdir -p "${data_doc_dir}/${dest%/*}" || \