diff options
author | P. J. McDermott <pjm@nac.net> | 2013-07-16 11:43:33 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-07-16 11:43:33 (EDT) |
commit | 5091d4e56a4da54fc1ec281f70b84e71f8012ac6 (patch) | |
tree | e587939d053771d90d9edb58948d97830f09d6ea /lib | |
parent | b263b7924c9600bfeb71a284ba6cf07fd0383929 (diff) |
include: Extract and write control information.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cmd/include.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/cmd/include.sh b/lib/cmd/include.sh index 8bf808e..f62f747 100644 --- a/lib/cmd/include.sh +++ b/lib/cmd/include.sh @@ -36,6 +36,8 @@ cmd_include_main() local binver= local arch= local plat= + local feed= + local filename= for changes in "${@}"; do parse_control "${changes}" cmd_include_changes_field \ @@ -58,6 +60,19 @@ cmd_include_main() printf ' Architecture: %s\n' "${arch}" printf ' Platform: %s\n' "${plat}" printf ' Size: %s\n' "${size}" + feed="${conf_incoming_channel}/${cmd_include_distribution}" + feed="${feed}/main/${plat}/${arch}" + mkdir -p "dists/${feed}/.db/" + tar -xzOf "$(dirname "${changes}")/${file}" 'control.tar.gz' | \ + tar -xzO './control' >"dists/${feed}/.db/${pkg}.control" + filename="../../../../../pool/main/$(printf '%s\n' \ + "${cmd_include_source}" | \ + sed 's/\(.\).*/\1/')/${cmd_include_source}/${file}" + printf 'Filename: %s\nSize: %s\nMD5sum: %s\n' \ + "${filename}" "${size}" \ + "$(md5sum "$(dirname "${changes}")/${file}" | \ + sed 's/ .*$//')" \ + >>"dists/${feed}/.db/${pkg}.control" done <<-EOF ${cmd_include_files} EOF |