#!/usr/bin/bash
set -x
cd /root/bin
rm -rf /root/logs
mkdir /root/logs -pv			

BASEDIR="/var/www/html/repo/rhel/rhel10"



if [ -f /var/run/repguncelle ]
then 
	echo basladik dedikya
else
touch /var/run/repguncelle
fi


for rn in `cat /var/www/html/repo/rhel/rhel10/bin/repolist.txt`
do
	echo $rn
	reposync --remote-time           --noautoremove --nogpgcheck  --bugfix  --enhancement               --security --downloadcomps --download-metadata --setopt=repo_id.module_hotfixes=1 --repo=$rn -p $BASEDIR | tee -a /root/logs/$rn.log.txt 
	reposync --remote-time  --source --noautoremove --nogpgcheck  --bugfix  --enhancement               --security --downloadcomps --download-metadata --setopt=repo_id.module_hotfixes=1 --repo=$rn -p $BASEDIR | tee -a /root/logs/$rn.log.txt
done

