summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-28 19:38:03 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-28 19:38:03 (EDT)
commit90de501005537b8d8164316dc6116c9431d58a53 (patch)
tree7c7427793614537a150e1298739dee1e260933d8
parenteb8818bd4ebaa6394f581798cb9ddb77d19f13d0 (diff)
Write cache file in ob_parse_package_metadata().
-rw-r--r--lib/package.sh24
1 files changed, 17 insertions, 7 deletions
diff --git a/lib/package.sh b/lib/package.sh
index 833bbc7..5f21449 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -66,7 +66,8 @@ ob_init_package()
ob_parse_package_metadata()
{
- _ob_local _obppm_opt _obppm_cache_file _obppm_param
+ _ob_local _obppm_opt _obppm_cache_file _obppm_pkg \
+ _obppm_param_name _obppm_param_value
while getopts 'c:' _obppm_opt; do
case "${_obppm_opt}" in
@@ -89,13 +90,22 @@ ob_parse_package_metadata()
_ob_package_do 'parse_package_metadata'
if [ -n "${_obppm_cache_file}" ]; then
- # FIXME: Finish.
- for _obppm_param in ${_OB_SOURCE_PARAMETERS}; do
- foo="$(echo "${foo}" | sed "s/'/'\\\\''/g")"
- >>"${_obppm_cache_file}"
+ >"${_obppm_cache_file}"
+ for _obppm_param_name in ${_OB_SOURCE_PARAMETERS}; do
+ _obppm_param_value="$(ob_get_source_parameter \
+ "${_obppm_param_name}" | sed "s/'/'\\\\''/g")"
+ printf "%s='%s'" \
+ "${_obppm_param_name}" "${_obppm_param_value}" \
+ >>"${_obppm_cache_file}"
done
- for _obppm_param in ${_OB_SOURCE_PARAMETERS}; do
- :
+ for _obppm_pkg in $(ob_get_binary_packages); do
+ for _obppm_param_name in ${_OB_BINARY_PARAMETERS}; do
+ _obppm_param_value="$(ob_get_binary_parameter "${_obppm_pkg}" \
+ "${_obppm_param_name}" | sed "s/'/'\\\\''/g")"
+ printf "%s='%s'" \
+ "${_obppm_param_name}" "${_obppm_param_value}" \
+ >>"${_obppm_cache_file}"
+ done
done
fi