#These need to be done each time you want to make new install images
. locations.include
if [ $ARCH != `uname -i` ] ; then
  echo "You seem to be trying to build arch $ARCH , on a `uname -i` system"
  echo "exiting"
  exit 1
fi
echo "Do you want to build new install images? y or n"
read answer
if [ $answer = "y" ] ; then
	echo "You indicated you wanted to make new install images, making them now."
	echo "Your new install images will be in ../../../images/$DEFAULT"
        echo "Creating hdlist now "
        ./subscripts/build.hdlist.sh
	./subscripts/build.release.site.sh
	./subscripts/make.updates.img.sh
        if [ $? -eq 1 ] ; then
           echo "make.updates.img.sh failed"
           exit 2
        fi
	./subscripts/make.products.img.sh
fi
# These should be done just before rsyncing up
echo "---------------------------------------------------------------"
echo "Creating hdlist now"
echo "---------------------------------------------------------------"
./subscripts/build.hdlist.sh
echo "---------------------------------------------------------------"
echo "Creating the yum headers now"
echo "---------------------------------------------------------------"
./subscripts/makeyum.site.sh
echo "---------------------------------------------------------------"
cd $RELEASEDIR/$ARCH/$SITEDIR/$SITERPMDIR
repoview -f -t "Scientific Linux $SITE $VERSION $ARCH Base" .
cd $RELEASEDIR/$ARCH/$SITEDIR/updates/security
repoview -f -t "Scientific Linux $SITE $VERSION $ARCH Security Updates" .
cd $RELEASEDIR/$ARCH/$SITEDIR/build/scripts
