#!/bin/bash

for rn in $(cat repolist.txt)
do
subscription-manager repos --enable=$rn
mkdir -pv /repo/rhel6/${rn}
/usr/bin/reposync -r $rn -p /repo/rhel6 --downloadcomps  --download-metadata --newest-only
subscription-manager repos --disable=$rn
done

for rn in $(cat repolist.txt)
do
subscription-manager repos --enable=$rn
/usr/bin/reposync -r $rn -p /repo/rhel6 --downloadcomps  --download-metadata 
subscription-manager repos --disable=$rn

done




