httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Ralf S. Engelschall)
Subject Re: autograb latest from dev/from-cvs
Date Thu, 19 Mar 1998 07:18:55 GMT

In article <> you wrote:

> I want to grab the latest tarball automatically from /from-cvs/.  The
> easiest way would be to be able to predict the filename.  Right now you
> can't do that.  

> Suggestions?  Making a symlink to a fixed name is fine except that it
> means anything mirroring (unless it uses ftp) would take two copies.

I used the following script under FreeBSD for this task in the past.  It uses
the ftpget from Squid and NCFTP but both can be substituted simply.

##  getsnap -- get Apache development source snapshot
##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. 

$tmpfile = "/tmp/$$";

print "Retrieving snapshot information... ";
system("ftpget $tmpfile /httpd/from-cvs/ A ftp rse\ >$tmpfile");
print "Done\n";

open(FP, "<$tmpfile");
$last = "";
while (<FP>) {
    $last = $_ if (m|apache_.*\.tar\.gz|);
$last =~ m|.* ([^ ]+)\r\n$|;
$file = $1;
print "Latest Snapshot: $file\n";

print "Retrieving snapshot tarball... ";
print "Done\n";

print "Converting snapshot package... ";
system("gunzip <$file | tardy -Prefix apache_1.3b-dev | gzip -9 >apache_1.3b-dev.tar.gz");
system("rm $file");
print "Done\n";

system("rm $tmpfile");

                                       Ralf S. Engelschall

View raw message