#!/bin/sh
#
# Generates a database of all files in the redhat distribution.
# (this requires my unrpm command :-)

ofile=/tmp/redhat.ff
rhdir=/cdrom/RedHat/RPMS

cd $rhdir

for i in *.rpm
do
    j=`basename $i .i386.rpm`
    echo >&2 -n "$i: "
    echo "COMMENT: RedHat V2.1 -- $i"
    unrpm $i | cpio -ivt | awk '{ print substr($0,1,55) "'$j'/" substr($0,56,999) }'
done | mk_ff -s0 -fcpio > $ofile
