httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@telebusiness.co.nz>
Subject Re: Help me? The build isn't working.
Date Mon, 02 Feb 1998 20:00:23 GMT
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/";

rmtree $dir;
mkpath $dir, 0755;

chdir $dir;

my $p = HTML::LinkExtor->new(\&cb, $cvs);
my $cnt;

sub cb {
    my($tag, %links) = @_;
    return unless exists $links{href} and $links{href} =~ /apache_/;
    return unless ++$cnt == 4;

    my $file = URI::URL->new($links{href})->rel;
    warn "mirror $links{href} => $file\n";

    mirror $links{href} => $file;
    system "gunzip < $file | tar -xvf -";
    unlink $file;
}

$p->parse(get $cvs);




Mime
View raw message