diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/package.sh | 24 |
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 |