#!/bin/sh
#
# vim:tabstop=3:expandtab:shiftwidth=3 
#
# $Date: 2012-01-26 11:41:51 +0100 (Thu, 26 Jan 2012) $
# $Revision: 433 $
#

set -o noglob
for TYPE in list info
do
   echo "Getting yum $TYPE for the enabled repo's"
   yum $TYPE > ~/yum.$TYPE
   # Get the list of disabled repo's, exclude the c5-media
   for R in `yum repolist all | grep 'disabled$' | \
             awk '{print $1}'`
   do
      echo "Getting yum $TYPE for the repo $R"
      yum --disablerepo='*' --enablerepo="$R" $TYPE available 2> /dev/null | \
      sed 's/^/#/' >> ~/yum.$TYPE
   done
done

