!/bin/bash
# This script syncs the Linux Mint repositories using debmirror into /srv/mirror/linuxmint
# Written by Mahyuddin Susanto

mirror=packages.linuxmint.com
root=/
method=http
dist=elyssa,felicia,gloria
SECTION=main,upstream,community,import,backport,romeo
arch=i386,amd64
TO=/srv/mirror/linuxmint

if [ ! -f `which debmirror` ]; then
        echo "No debmirror command found, please install the debmirror package."
        exit 1
fi

mkdir -p $TO

/usr/bin/debmirror --progress -v --passive \
--ignore-release-gpg \
--ignore-missing-release \
--host=$mirror --root=$root/ \
--method=$method --dist=$dist \
--section=$SECTION --arch=$arch \
$TO
