Created
October 1, 2014 07:42
-
-
Save hansode/43909995e6145d131077 to your computer and use it in GitHub Desktop.
mirror-centos-to-local.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# requires: | |
# bash | |
# mkdir, rsync | |
# | |
set -e | |
set -o pipefail | |
set -x | |
relver=${1} | |
[[ -n ${relver} ]] | |
dest=./${relver}/ | |
mkdir -p ${dest} | |
for subdir in extras os updates; do | |
rsync --progress \ | |
-av \ | |
--delete \ | |
rsync://archive.kernel.org/centos/${relver}/${subdir}/ \ | |
${dest}/${subdir}/ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment