ANA_RUN=/usr/lib/anaconda-runtime
RELEASETREE=/mnt/src/73rolling
ARCH=i386
# Your directory structure needs to be setup like this
# for me $ARCH=i386 ( I have not tested anything else)
#$ARCH/RedHat/RPMS/  # Put all your rpms in here
#$ARCH/RedHat/base/  # Copy the comps file from the 1st cd here, modify as needed
#SRPMS/             # Needs to be here, but can be empty.  If it is
                    # then builddistro dies with an error, but it build
                    # everything that you need.

####
# Make the images

# The first thing you need to run is genhdlist
#echo "running genhdlist for the first time"
#$ANA_RUN/genhdlist $RELEASETREE/$ARCH


# Next build the installer images/bootdisks/?other stuff?
#echo "Running buildinstall "
#$ANA_RUN/buildinstall $RELEASETREE/$ARCH

####
# Split everything into cd sized chunks

# Pkgorder tells splitdistro what need to go on which cd (?)
export PYTHONPATH=/usr/lib/anaconda
#echo "running pkgorder"
#$ANA_RUN/pkgorder $RELEASETREE/$ARCH $ARCH > /$RELEASETREE/$ARCH/RedHat/base/pkgorder

# Do the splitting
echo "running splitdistro"
$ANA_RUN/splitdistro --fileorder /$RELEASETREE/$ARCH/RedHat/base/pkgorder $RELEASETREE $ARCH

# This should leave you with directories $ARCH-disc[1-4] that are almost
# ready for burning.

# Make genhdlist for CD1 so that the installer knows which cd has which
# packages.  Note the --withnumbers argument
echo "running genhdlist a 2nd time"
$ANA_RUN/genhdlist --withnumbers --fileorder /$RELEASETREE/$ARCH/RedHat/base/pkgorder $RELEASETREE/$ARCH-disc1 $RELEASETREE/$ARCH-disc2

####
# Make the iso's
echo "you need to build the cd images now"

