summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/package.sh55
1 files changed, 0 insertions, 55 deletions
diff --git a/lib/package.sh b/lib/package.sh
index aa1a9a3..eab9709 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -60,63 +60,8 @@ _ob_package_do()
ob_parse_package_metadata()
{
- local opt=
- local cache_file=
- local pkg=
- local pkg_clean=
- local param_name=
- local param_value=
-
- OPTIND=1
- while getopts 'c:' opt; do
- case "${opt}" in
- c)
- cache_file="${OPTARG}"
- ;;
- ?)
- _ob_abort
- ;;
- esac
- done
- shift $(($OPTIND - 1))
-
- # Load a previously saved cache file, if any.
- if [ -n "${cache_file}" -a -r "${cache_file}" ]; then
- if [ "${cache_file#*/}" != "${cache_file}" ]; then
- . "${cache_file}"
- else
- . "./${cache_file}"
- fi
- return 0
- fi
-
_ob_package_do 'parse_package_metadata'
- if [ -n "${cache_file}" ]; then
- >"${cache_file}"
- for param_name in ${_OB_SOURCE_PARAMETERS}; do
- param_value="$(ob_get_source_parameter \
- "${param_name}" | sed "s/'/'\\\\''/g")"
- printf "%s='%s'\n" \
- "_OB_SRCFIELD_${param_name}" "${param_value}" \
- >>"${cache_file}"
- done
- for pkg in $(ob_get_binary_packages); do
- pkg_clean="$({ tr 'a-z' 'A-Z' | tr -dC 'A-Z0-9';} <<-EOF
- "${pkg}"
- EOF
- )"
- for param_name in ${_OB_BINARY_PARAMETERS}; do
- param_value="$(ob_get_binary_parameter "${pkg}" \
- "${param_name}" | sed "s/'/'\\\\''/g")"
- printf "%s='%s'\n" \
- "_OB_BINFIELD_${pkg_clean}_${param_name}" \
- "${param_value}" \
- >>"${cache_file}"
- done
- done
- fi
-
return 0
}