From 5091d4e56a4da54fc1ec281f70b84e71f8012ac6 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 16 Jul 2013 11:43:33 -0400 Subject: include: Extract and write control information. --- (limited to 'lib/cmd') 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 -- cgit v0.9.1