#!/bin/sh
#########################
REPODIR=.
OVERRIDEFILE=overridefile
PACKFILE=Packages
SRCFILE=Sources
#########################

cd   $REPODIR

if [ -f $PACKFILE.gz ] ; then rm $PACKFILE.gz ; fi
if [ -f $SRCFILE.gz  ] ; then rm $SRCFILE.gz  ; fi 

find . -name "*.deb"  >  $OVERRIDEFILE
dpkg-scanpackages     .  $OVERRIDEFILE > $PACKFILE
rm -rf                   $OVERRIDEFILE
#dpkg-scanpackages     .  `find . -name "*.deb"` > $PACKFILE
gzip $PACKFILE

dpkg-scansources      .  | gzip > $SRCFILE.gz 
 



