From 42b3fcf0c452818db753c18a5537d28f79abb7ff Mon Sep 17 00:00:00 2001 From: Andreas Koenig Date: Mon, 31 Dec 2012 15:52:58 +0100 Subject: [PATCH] offer a shorter version of the mirror script in the HOWTO --- HOWTO.mirrorcpan | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/HOWTO.mirrorcpan b/HOWTO.mirrorcpan index cd7fde6..c0c44d3 100644 --- a/HOWTO.mirrorcpan +++ b/HOWTO.mirrorcpan @@ -25,15 +25,23 @@ http://cpan.perl.org/SITES.html#RSYNC The first thing you should prepare is the CPAN tree itself on your disk. The source where you take it from does not matter that much. Take it from where you always took it. The setup I suggest is to -mirror authors/ and modules/ with this program. And once per day or so -do a traditional rsync from that old school mirroring host, maybe -authors/ and modules/, something like: - - rsync -av --delete --exclude "authors/" --exclude "modules/" \ - ftp.funet.fi::CPAN /home/ftp/pub/CPAN +mirror authors/ and modules/ with this program. The loop is something like this: +Short version: + + #!/bin/sh + + RSYNC_PASSWORD=secret + export RSYNC_PASSWORD + + for t in modules authors ; do + rrr-client --source rsync://andk@pause.perl.org:8732/PAUSE/$t/ --target /home/ftp/pub/PAUSE/$t/ --tmpdir /home/tmp & + done + +Or if the short version is not sufficient for some reason: + $ENV{USER}="sandy"; # fill in your name $ENV{RSYNC_PASSWORD} = "secret"; # fill in your passwd -- 2.11.4.GIT