#!/bin/sh
i='7'
for j in 0.1406 1.1503 2.1511 3.1611 4.1708 5.1804 6.1810 
do
	wget -c -r -np -nd -k -L -e robots=off -R "index.html*" -A "kernel-devel*" http://vault.centos.org/"$i.$j"/os/i386/RPMS/
	wget -c -r -np -nd -k -L -e robots=off -R "index.html*" -A "kernel-devel*" http://vault.centos.org/"$i.$j"/os/i386/Packages/
	wget -c -r -np -nd -k -L -e robots=off -R "index.html*" -A "kernel-devel*" http://vault.centos.org/"$i.$j"/os/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"/os/x86_64/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
	mv *.rpm "$i.$j"
done

