#!/bin/sh -e
# Generate files required for installation process.

# This variable should point to top binary directory.
RE_ROOT=/REbeta/i586

cd "$RE_ROOT"

rm -f Mandrake/base/{hdlist.cz{,2},depslist*}
./misc/genhdlist_cz2 -o Mandrake/base/hdlist.cz Mandrake/RPMS
./misc/genbasefiles Mandrake/base Mandrake/base/hdlist.cz
genfilelist Mandrake/RPMS >Mandrake/base/filelist
./misc/genhdlist_cz2 --noclean --ordered-depslist Mandrake/base/depslist.ordered -o Mandrake/base/hdlist.cz Mandrake/RPMS

# Check for broken dependencies.
! fgrep NOTFOUND_ Mandrake/base/depslist.ordered
