#!/bin/bash

cd $(dirname $0)

DISTS=stable

for DIST in $DISTS; do
	for arch_dir in  dists/$DIST/main/binary-*; do 
		arch=${arch_dir##*-};
		echo $arch:
		dpkg-scanpackages -a$arch pool | tee $arch_dir/Packages | gzip -9c > $arch_dir/Packages.gz
	done
	
	(
		cd dists/$DIST
		apt-ftparchive -c apt-ftparchive.conf  release .  > Release
		rm -f Release.gpg
		gpg -abs -o Release.gpg Release
	)
done

