Saturday, October 17, 2009

Rsync Slackware-Current

This morning, i started to use rsync to mirror Slackware-Current tree from Indonesian mirror site. I used Eric's rsync script located here, but i modified the script a little bit to exclude several more directory which i don't need.

So, here's my modified script:
VERSION=${VERSION:-current}
TOPDIR="/home/willysr"
RSYNCURL="kambing.ui.ac.id::slackware"

echo "Syncing version '$VERSION' ..."

if [ ! -d ${TOPDIR}/slackware-$VERSION ]; then
echo "Target directory ${TOPDIR}/slackware-$VERSION does not exist!"
exit 1
fi

cd ${TOPDIR}/slackware-$VERSION
rsync $1 -vaz --delete --exclude "pasture" --exclude "source" --exclude "isolinux" --exclude "patches" --exclude "usb-and-pxe-installers" --exclude "extra/source" --exclude "slackware/kdei" --exclude "testing/source" ${RSYNCURL}/slackware-$VERSION/ .