#! /bin/bash # To wget all files kept in a particular directory in an url into /etc/yum.repos.d. # All the repos maintained at http://www2.fizik.usm.my/configrepo/howto/repos/ will be downloaded to /etc/yum.repos.d of a computer that runs this code. ########################################### cd /etc/yum.repos.d wget -r -l1 --no-parent http://www2.fizik.usm.my/configrepo/howto/repos/ cp www2.fizik.usm.my/configrepo/howto/repos/* . rm index* rm -rf www2.fizik.usm.my rpm --import http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL yum update centos-release