Skip to content

Instantly share code, notes, and snippets.

@hansode
Created October 1, 2014 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hansode/43909995e6145d131077 to your computer and use it in GitHub Desktop.
Save hansode/43909995e6145d131077 to your computer and use it in GitHub Desktop.
mirror-centos-to-local.sh
#!/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