. locations.include
up1=`dirname $TREE`
up2=`dirname $up1`
if [ -x /usr/bin/yum-arch ] ; then 
  #
  # Do the base SL RPMS
  #
  cd $TREE/$DEFAULT/RPMS
  if [ -d .olddata ] ; then
    /bin/rm -r .olddata
  fi
  echo "Making yum headers for  `pwd`"
  if [ -s yumgroups.xml ] ; then
     createrepo -g yumgroups.xml .
  else
     createrepo .
  fi
  if [ -d .olddata ] ; then
    /bin/rm -r .olddata
  fi
  yum-arch .
  repoview -t "Scientific Linux" .
  #
else
  echo "You need to install the yum package"
fi
