You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dg...@hyperreal.org on 1998/04/18 00:05:35 UTC

cvs commit: apache-devsite fetch-from-cvs.txt index.html

dgaudet     98/04/17 15:05:35

  Modified:    .        index.html
  Added:       .        fetch-from-cvs.txt
  Log:
  add doug's perl script for fetching from-cvs
  
  Revision  Changes    Path
  1.18      +4 -0      apache-devsite/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /export/home/cvs/apache-devsite/index.html,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- index.html	1998/02/26 07:53:20	1.17
  +++ index.html	1998/04/17 22:05:34	1.18
  @@ -115,6 +115,10 @@
          with <SAMP>gzip</SAMP>.  Not guaranteed
          to do anything, especially not compile or work.
      </LI>
  +   <LI>Doug MacEachern wrote <a href="fetch-from-cvs.txt">a perl script</a>
  +       which you can use to automate fetching from the above from-cvs 
  +       location.
  +   </LI>
     </UL>
   
     <P>
  
  
  
  1.1                  apache-devsite/fetch-from-cvs.txt
  
  Index: fetch-from-cvs.txt
  ===================================================================
  
  From dougm@telebusiness.co.nz Fri Apr 17 15:07:32 1998
  Date: Tue, 03 Feb 1998 09:00:23 +1300
  From: Doug MacEachern <do...@telebusiness.co.nz>
  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/";
  
  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);