[tz] Detecting a new release

Paul_Koning at Dell.com Paul_Koning at Dell.com
Fri Aug 3 14:28:19 UTC 2012


O
On Aug 3, 2012, at 6:57 AM, Ian Abbott wrote:

> On 2012-08-03 10:58, Neil Masson wrote:
>> This might have been talked about recently, but I don't remember any
>> resolution.
>> 
>> I have a script which polls the IANA Website daily to detect if there
>> has been any update.  It parses the html to find the latest version and
>> then checks to see if the version has changed since the last time.  This
>> solution is fragile and could easily be broken if the layout of the
>> Website changes.
>> 
>> I don't see any way of detecting the version from the ftp or rsync sites
>> as the "real" filename which contains the version has been replaced with
>> a link tzdata-latest.tar.gz.
> 
> You could parse the output of lftp or ncftpls in long-listing mode: ...

Or just look at the names of the tarballs to see if a new one showed up.  If you sort them lexicographically, ignoring any that have two-digit years, any new one is the last one in that list.

I've been using that approach for a while now, it's about 3 lines of Python...

	paul





More information about the tz mailing list