fielding 99/08/09 01:20:07
Modified: . fetch-from-cvs.txt Log: Update example to work with new directory names. Submitted by: Magnus Bodin <[EMAIL PROTECTED]> Reviewed by: Roy Fielding Revision Changes Path 1.2 +13 -22 apache-devsite/fetch-from-cvs.txt Index: fetch-from-cvs.txt =================================================================== RCS file: /export/home/cvs/apache-devsite/fetch-from-cvs.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- fetch-from-cvs.txt 1998/04/17 22:05:34 1.1 +++ fetch-from-cvs.txt 1999/08/09 08:20:06 1.2 @@ -1,28 +1,21 @@ +#!/usr/bin/perl -w +# +# Simple script to fetch the latest tarball in from-cvs/ and unpack it +# in $dir. +# +# Script by Doug MacEachern <[EMAIL PROTECTED]> +# minor fix by Magnus Bodin <[EMAIL PROTECTED]> -From [EMAIL PROTECTED] Fri Apr 17 15:07:32 1998 -Date: Tue, 03 Feb 1998 09:00:23 +1300 -From: Doug MacEachern <[EMAIL PROTECTED]> -Organization: SITEL Telebusiness NZ, Ltd. -To: new-httpd@apache.org -Subject: Re: Help me? The build isn't working. -Reply-To: new-httpd@apache.org - -This script will fetch the latest tarball in from-cvs/ and unpack it in $dir -I posted it a few months ago, maybe it should be made available somewhere on -dev.apache.org? - --Doug - -#!/opt/perl5/bin/perl -w - use strict; use URI::URL (); use HTML::LinkExtor (); use LWP::Simple; use File::Path; -my $dir = shift || "/tmp/apache_1.3-dev"; -my $cvs = "http://dev.apache.org/from-cvs/"; +my $ver = '1.3'; +my $dir = shift || "/tmp/apache_$ver-dev"; +my $cvs = "http://dev.apache.org/from-cvs/apache-$ver/"; +my $filptn = "apache-$ver\_"; rmtree $dir; mkpath $dir, 0755; @@ -34,10 +27,10 @@ sub cb { my($tag, %links) = @_; - return unless exists $links{href} and $links{href} =~ /apache_/; + return unless exists $links{href} and $links{href} =~ /$fileptn/; return unless ++$cnt == 4; - my $file = URI::URL->new($links{href})->rel; + my $file = URI::URL->new($links{href})->rel($cvs); warn "mirror $links{href} => $file\n"; mirror $links{href} => $file; @@ -46,6 +39,4 @@ } $p->parse(get $cvs); - -