[tex-live] TL current version
Zdenek Wagner
zdenek.wagner at gmail.com
Sat May 5 16:30:56 CEST 2012
2012/5/5 Reinhard Kotucha <reinhard.kotucha at web.de>:
> On 2012-05-05 at 10:47:08 +0200, Herbert Voss wrote:
>
> > For an install script I need the current version
> > of TeXLive.
> > Is there an easier way than
> >
> > wget -qO- http://tug.org/texlive/ | grep -i "current release:" | cut -d"
> > " -f5
> >
> > which will be "2011"
>
> Hi Herbert,
> it's better to derive it from the distribution itself, maybe even
> from the server you intend to install from.
>
> Furthermore, I think that machine-readable files are more reliable
> for this purpose due to their well-defined syntax.
>
> ------------------------------------------------------------
> #!/bin/sh
>
> TLNET='http://ctan.org/tex-archive/systems/texlive/tlnet'
> TLCONFIG="${TLNET}/tlpkg/TeXLive/TLConfig.pm"
>
> wget -O- -q ${TLCONFIG} |
> sed -ne '/^ *\$ReleaseYear *=/s/.*= *\([0-9]*\) *;$/\1/p'
> ------------------------------------------------------------
>
> I've made whitespace characters optional here because they are
> optional in Perl. Optional line breaks are not supported though.
> However, I don't expect any changes to the coding style anyway.
>
Another option would be not to use sed but perl and use the downloaded
TLConfig.pm. Thus you are sure that you read the perl code by perl
interpreter.
> Regards,
> Reinhard
>
> --
> ----------------------------------------------------------------------------
> Reinhard Kotucha Phone: +49-511-3373112
> Marschnerstr. 25
> D-30167 Hannover mailto:reinhard.kotucha at web.de
> ----------------------------------------------------------------------------
> Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
> ----------------------------------------------------------------------------
--
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz
More information about the tex-live
mailing list