. locations.include
if [ -x /usr/bin/yum-arch ] ; then 
# make main site yum headers
  cd $TREE/sites/$SITE/Updates
  echo "Making yum headers for  `pwd`"
  if [ -s yumgroups.xml ] ; then
     createrepo -g yumgroups.xml .
  else
     createrepo .
  fi
  yum-arch .
# make errata site yum headers
  cd $TREE/sites/$SITE/errata/$SITE/RPMS
  echo "Making yum headers for  `pwd`"
  createrepo .
  yum-arch -l .
  if [ -d $TREE/sites/$SITE/contrib/RPMS ] ; then
# make contrib site yum headers if contrib exists
    cd $TREE/sites/$SITE/contrib/RPMS
    echo "Making yum headers for  `pwd`"
    if [ -s yumgroups.xml ] ; then
       createrepo -g yumgroups.xml .
    else
       createrepo .
    fi
    yum-arch -l .
  fi
else
  echo "You need to install the yum package"
fi
