MYPWD=`pwd`
export MYPWD
. ./locations.include
/bin/rm -r $RELEASEDIR/$ARCH-disc1
/bin/rm -r $RELEASEDIR/$ARCH-disc2
/bin/rm -r $RELEASEDIR/$ARCH-disc3
/bin/rm -r $RELEASEDIR/$ARCH-disc4
cd $RELEASEDIR/$ARCH/
mv errata ..
mv images ..
mv contrib ..
mv notsupported ..
mv sites ..
mv apt-rpm ..
mv ../SRPMS/vendor ../..
mv $DEFAULT/RPMS/yumgroups.xml ..
#$ANACONDADIR/genhdlist --default $DEFAULT `pwd`
echo "Using $RELEASEDIR/$ARCH/$DEFAULT/base/$FILEORDER as the fileorder file"
echo "and making a new one"
#echo "and not making a new one"
$ANACONDADIR/pkgorder $RELEASEDIR/$ARCH $ARCH $DEFAULT > $RELEASEDIR/$ARCH/$DEFAULT/base/$FILEORDER
echo "splitting tree with splittree"
echo "DEFAULT is $DEFAULT"
$ANACONDADIR/splittree.py --arch=$ARCH --total-discs=4 --bin-discs=3 --src-discs=1 --release-string="Scientific Linux 3.0.2" --default=$DEFAULT --pkgorderfile=$RELEASEDIR/$ARCH/$DEFAULT/base/$FILEORDER --distdir=$RELEASEDIR/$ARCH --srcdir=$RELEASEDIR/SRPMS/
cd $RELEASEDIR
echo "running genhdlist against split tree"
$ANACONDADIR/genhdlist --withnumbers --fileorder $RELEASEDIR/$ARCH/$DEFAULT/base/$FILEORDER --default $DEFAULT `pwd`/$ARCH-disc1 `pwd`/$ARCH-disc2 `pwd`/$ARCH-disc3
cd $RELEASEDIR/$ARCH
mv ../errata .
mv ../images .
mv ../contrib .
mv ../notsupported .
mv ../sites .
mv ../apt-rpm .
mv ../../vendor ../SRPMS/
mv ../yumgroups.xml $DEFAULT/RPMS
