Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <018001c2e4d7$5750f460$78d96f83@pomello> From: "Max Bowsher" To: "Ronald Landheer-Cieslak" , References: Subject: Re: Testsuite Date: Fri, 7 Mar 2003 18:28:24 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_017D_01C2E4D7.56FB5A50" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 ------=_NextPart_000_017D_01C2E4D7.56FB5A50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Ronald Landheer-Cieslak wrote: > BTW: is there any way to get the "current" or "latest" snapshot with a > simple wget? (i.e. is there a > http://www.cygwin.com/snapshots/latest...?) It would make it easier > to make a "snapshot" target and get the new-cygwin1.dll from there :) Not currently. If you are willing to use perl, the attached might serve as a base. Curiously, I couldn't find any scripts to do with snapshot page generation in sources.redhat.com CVS. Max. ------=_NextPart_000_017D_01C2E4D7.56FB5A50 Content-Type: application/octet-stream; name="getsnaps.pl" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="getsnaps.pl" #!/usr/bin/perl=0A= =0A= use warnings;=0A= use strict;=0A= use Digest::MD5;=0A= use LWP::Simple;=0A= =0A= chdir('snapshots');=0A= =0A= my $snaps =3D get("http://cygwin.com/snapshots/");=0A= unless ($snaps) { die "Unable to get http://cygwin.com/snapshots/\n"; };=0A= my (@snapurls) =3D $snaps =3D~ m||g;=0A= =0A= unless (@snapurls)=0A= {=0A= warn "No matches in web page! Dumping snaps.html\n";=0A= open(SNAPS,'>','snaps.html');=0A= print SNAPS $snaps;=0A= close(SNAPS);=0A= die "Dumped snaps.html, Exiting\n";=0A= };=0A= =0A= @snapurls =3D ($snapurls[0]);=0A= print STDERR join("\n", @snapurls) . "\n\n";=0A= foreach $_ (@snapurls)=0A= {=0A= my ($snapfile) =3D $_ =3D~ m|/([^/]*)$|;=0A= my ($snappath) =3D $_ =3D~ m|^(.*?)[^/]*$|;=0A= if (-f $snapfile)=0A= {=0A= print STDERR "$snapfile already downloaded!\n";=0A= }=0A= else=0A= {=0A= print STDERR "Downloading $snappath$snapfile... ";=0A= system('wget',"$snappath$snapfile");=0A= print STDERR "Done.\n";=0A= }=0A= }=0A= =0A= print STDERR "\n";=0A= =0A= my @tarballs =3D glob('cygwin-inst-*.tar.bz2');=0A= die "No snapshots in dir!\n" unless @tarballs;=0A= while (1 < @tarballs)=0A= {=0A= $_ =3D shift @tarballs;=0A= print STDERR "Removing $_\n";=0A= unlink $_;=0A= }=0A= =0A= # @tarballs =3D ($tarballs[$#tarballs]);=0A= =0A= foreach my $tarball (@tarballs) {=0A= my ($version) =3D $tarball =3D~ m/^cygwin-inst-([0-9]{8})\.tar\.bz2$/;=0A= my $size =3D -s $tarball;=0A= =0A= open(TARBALL, '<', $tarball);=0A= my $md5 =3D Digest::MD5->new;=0A= $md5->addfile(*TARBALL);=0A= close(TARBALL);=0A= my $md5sum =3D $md5->hexdigest;=0A= =0A= open(SETUPINI, '>', 'setup.ini');=0A= # my $time =3D time();=0A= # my $setup_ini =3D <