summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-03 21:57:46 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-03 21:57:46 (EDT)
commit9373e9c4337247f76fb0906387b44a9c437fc28c (patch)
tree9c610fc8d4d3c3c90ef79e589ff66fa9d711acb5
parent8d2135c8c372841b0a56c1781bc114e07c5fdec2 (diff)
Don't clobber valid binary names in cache writing.
-rw-r--r--lib/package.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/package.sh b/lib/package.sh
index 6b71304..7bfec63 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -68,7 +68,7 @@ ob_init_package()
ob_parse_package_metadata()
{
- _ob_local _obppm_opt _obppm_cache_file _obppm_pkg \
+ _ob_local _obppm_opt _obppm_cache_file _obppm_pkg _obppm_pkg_clean \
_obppm_param_name _obppm_param_value
while getopts 'c:' _obppm_opt; do
@@ -112,13 +112,13 @@ ob_parse_package_metadata()
>>"${_obppm_cache_file}"
done
for _obppm_pkg in $(ob_get_binary_packages); do
- _obppm_pkg="$(echo "${_obppm_pkg}" | tr 'a-z' 'A-Z' | \
+ _obppm_pkg_clean="$(echo "${_obppm_pkg}" | tr 'a-z' 'A-Z' | \
tr -dC 'A-Z0-9')"
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'\n" \
- "_OB_BINFIELD_${_obppm_pkg}_${_obppm_param_name}" \
+ "_OB_BINFIELD_${_obppm_pkg_clean}_${_obppm_param_name}" \
"${_obppm_param_value}" \
>>"${_obppm_cache_file}"
done