#!/bin/bash
#
# Check slackware-current
#
# Where to download from
# should script it so that the different sources can be listed and
# selected from the command line
SOURCE="rsync://rsync.slackware.at/slackware/slackware-$1/"
#SOURCE="rsync://ftp.slackware.com/slackware/slackware-$1/"
#SOURCE="rsync://ftp.heanet.ie/slackware/slackware-$1/"
#SOURCE="rsync://ftp.scarlet.be/slackware/slackware-$1/"
DEST="/home/slackware-distros/slackware-$1"
LIMIT="--bwlimit=32"
# Change as necessary
OPTIONS="--archive --compress --delete-after --delete-excluded --hard-links \
--partial --perms --progress --recursive --sparse --verbose $LIMIT"
EXCLUDE="--include=source/**ssh** --exclude=source/** --exclude=pasture --exclude=kdei \
--exclude=zipslack --exclude=aspell-word-lists"
MESSAGE="Downloading"
if [ -n $2 ]; then
if [ "$2" = "-c" ]; then
OPTIONS="$OPTIONS --dry-run"
MESSAGE="Checking"
else
OPTIONS="$OPTIONS $2"
fi
fi
/bin/echo "$MESSAGE slackware-$1..."
/usr/bin/rsync $OPTIONS $EXCLUDE $SOURCE $DEST