Update of /cvsroot/fink/experimental/monipol/scripts In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22561
Modified Files: checkrsyncmirrors.pl Log Message: Rsync timeout and pretty-printed mirror name. Index: checkrsyncmirrors.pl =================================================================== RCS file: /cvsroot/fink/experimental/monipol/scripts/checkrsyncmirrors.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- checkrsyncmirrors.pl 29 Oct 2009 13:25:53 -0000 1.3 +++ checkrsyncmirrors.pl 29 Oct 2009 15:55:21 -0000 1.4 @@ -8,23 +8,28 @@ my $mirror_FH; my $timestamp_FH; my $mirror; -my $timestamp = ""; +my $timestamp; my $command; my $command_result; my $ts; my @files = ('TIMESTAMP', 'LOCAL'); #my @files = ('TIMESTAMP'); my $file; +my $mirrorname; +my @mirrornameparts; open($mirror_FH, '<', "$basepath/lib/fink/mirror/rsync") || die "Could not open rsync mirrors file\n"; while (<$mirror_FH>) { if($_ =~ /(^...-..: |Primary: )(rsync:\/\/.*)/) { $mirror = $2; chomp $mirror ; - print "$mirror:\n"; + $mirrorname = $mirror; + $mirrorname =~ s/^rsync:\/\///; + ($mirrorname) = split(/\//, $mirrorname); + print "$mirrorname:\n"; foreach $file (@files) { system("rm -f ./$file"); - $command = "rsync -qaz $mirror" . "$file ./$file 2>/dev/null"; + $command = "rsync -qaz --timeout=5 $mirror" . "$file ./$file 2>/dev/null"; $command_result = system("$command"); $command_result = $command_result >> 8; if ($command_result == 0) { ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs