cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Downloads page and Cygwin

From: Václav Zeman <vhaisman_at_gmail.com>
Date: Thu, 07 Nov 2013 00:28:25 +0100

On 11/06/2013 11:20 PM, Daniel Stenberg wrote:
> On Wed, 6 Nov 2013, Václav Zeman wrote:
>
>> Cygwin packages repository usually keeps at least two versions,
>> sometimes three. There is the current version, previous version and
>> some times testing version. Then (recently) there are two sets these,
>> one for x86 and another for AMD64.
>>
>> How does your script scan the version? Where does it take the
>> information from?
>
> Whereever we point it to. As you can see the download page did update
> when I changed what it scans for.
>
> It now scans:
>
> http://mirrors.kernel.org/sources.redhat.com/cygwin/x86/release/curl/curl-$version-1.tar.bz2
>
>
> and
>
> http://mirrors.kernel.org/sources.redhat.com/cygwin/x86/release/curl/libcurl4/libcurl4-$version-1.tar.bz2
>
>
> ... and it'll do it for the last N versions in a reversed cronological
> order, which makes it find the newest one first.
>
> Previously it did a regex scan for a pattern, but that was trickier
> since the older version would appear first in all pages!

This should get you the right version from setup.ini (for the x86
variant of Cygwin):

curl -s 'http://mirrors.kernel.org/sourceware/cygwin/x86/setup.ini'
|perl -e 'local $/; $_=<STDIN>; /@ curl[\n](?:[^\n]+[\n])+?version:
(.*?)-\d+[\n]/; print $1;'

-- 
VZ

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2013-11-07