diff options
Diffstat (limited to 'lib/cmd')
-rw-r--r-- | lib/cmd/include.sh | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/lib/cmd/include.sh b/lib/cmd/include.sh index 4d1e8c5..4730255 100644 --- a/lib/cmd/include.sh +++ b/lib/cmd/include.sh @@ -19,13 +19,24 @@ use control +CMD_INCLUDE_CHANGES_FIELDS='Package Source Version Architecture Platform +Distribution Maintainer Changed-By Date Changes Filename' + +cmd_include_package= +cmd_include_distribution= +cmd_include_filename= + cmd_include_main() { local changes for changes in "${@}"; do - parse_control "${changes}" cmd_include_changes_field '' '' + parse_control "${changes}" cmd_include_changes_field \ + "${CMD_INCLUDE_CHANGES_FIELDS}" '' done + + printf 'Including %s into %s: %s\n' "${cmd_include_package}" \ + "${cmd_include_distribution}" "${cmd_include_filename}" } cmd_include_changes_field() @@ -33,8 +44,15 @@ cmd_include_changes_field() local name="${1}" local value="${2}" - printf '%s:' "${name}" - IFS="${LF}" - printf ' %s\n' ${value} - unset IFS + case "${name}" in + 'Package') + cmd_include_package="${value}" + ;; + 'Distribution') + cmd_include_distribution="${value}" + ;; + 'Filename') + cmd_include_filename="${value}" + ;; + esac } |