RFC: 1.7.33 problem with user's home directory

David Stacey drstacey@tiscali.co.uk
Wed Dec 10 23:29:00 GMT 2014

On 10/12/14 20:52, cyg Simple wrote:
> On Fri, Dec 5, 2014 at 4:05 PM, Andrey Repin wrote:
>> Greetings, Corinna Vinschen!
>>>>> I'd appreciate if those not shy to install developer snapshots would
>>>>> give this stuff a try in the meantime.
>>>> I think I'm about to make a script to install snapshots, at this rate it seems
>>>> the right thing to do.
>>>> Is there a direct way to query for the latest snapshot?
>>>   The snapshots always have a date attached to the filename.
>> I mean, if there's a way to know, what is the latest available snapshot?
>> If I want to write a script, that fetch [and install] one.
>> I can parse the/snapshots/  page, of course, but this is the least desirable
>> choice. For multiple reasons. I would like to have a single point, that could
>> refer to the very latest snapshot. Even if it is something like
>> /snapshots/x86/cygwin-inst-latest.tar.xz redirecting to
>> actual latest snapshot, that'd be quite enough.
> You could just parse the setup.hint file from your favorite mirror.

This doesn't work in the general case, as not all snapshots are uploaded 
as test packages. Plus you'd have to wait while your favourite mirror 
picked up the new package.

Sadly, parsing the HTML is the only way to go right now. This is very 
error-prone, as any assumption you make about the structure of the HTML 
could change with no notice. The following works (as the snapshots page 
stands) by extracting the date from one of the filenames:

wget -q -O - http://cygwin.com/snapshots/ | egrep 
"cygwin1-[0-9]*.dll.xz" | head -n 1 | sed 

This is about as fool-proof as I can make it. It assumes nothing about 
the HTML, so it should survive a fairly substantial change to the web 
page. Provided we don't change the format of the filenames, the above 
stands a chance of working. YMMV.



Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list