aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sync-origin-mirror-distfiles.sh')
-rwxr-xr-xsync-origin-mirror-distfiles.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/sync-origin-mirror-distfiles.sh b/sync-origin-mirror-distfiles.sh
new file mode 100755
index 0000000..b87cd37
--- /dev/null
+++ b/sync-origin-mirror-distfiles.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Copyright 2011-2015 Gentoo Authors; Distributed under the GPL v2
+
+FINALDIR="/data/mirror"
+PASSWD_FILE=""
+RSYNC="/usr/bin/rsync"
+RSYNC_ARGS="--recursive --links --perms --times --delete --hard-links --no-motd --timeout=300 ${PASSWD_FILE:+--password-file }${PASSWD_FILE}"
+RSYNC_ARGS="${RSYNC_ARGS} --quiet"
+
+module=distfiles
+${RSYNC} ${RSYNC_ARGS} masterreleases.gentoo.org::${module}/ ${FINALDIR}/${module}/