#!/bin/sh
i='8'
for j in 4.2105
do
	wget -c -r -np -nd -k -L -e robots=off -R "index.html*" -A "kernel-devel*" http://vault.centos.org/"$i.$j"/BaseOS/x86_64/os/Packages/
	#wget -c -r -np -nd -k -L -e robots=off -R "index.html*" -A "kernel-devel*" http://vault.centos.org/"$i.$j"/updates/i386/RPMS/
	#wget -c -r -np -nd -k -L -e robots=off -R "index.html*" -A "kernel-devel*" http://vault.centos.org/"$i.$j"/updates/i386/Packages/
	#wget -c -r -np -nd -k -L -e robots=off -R "index.html*" -A "kernel-devel*" http://vault.centos.org/"$i.$j"/updates/x86_64/RPMS/
	#wget -c -r -np -nd -k -L -e robots=off -R "index.html*" -A "kernel-devel*" http://vault.centos.org/"$i.$j"/updates/x86_64/Packages/
	if [ ! -d "$i.$j" ];then
		mkdir "$i.$j"
	fi
	rm -rf index.html*
	mv *.rpm "$i.$j"
done

