[tex-live] texdoc in luatex

Zdenek Wagner zdenek.wagner at gmail.com
Thu Jun 28 12:29:55 CEST 2007


2007/6/28, Hans Hagen <pragma at wxs.nl>:
> Reinhard Kotucha wrote:
> > Frank Küster writes:
> >
> >  > if os.execute('nothere 2>/dev/null') / 256 == 127 then
> >  >    print("does not exist")
> >  > end
> >
> > /dev/null works on UNIX, on Windows it's nul (and does not appear in
> > the filesystem).  However, another nice solution would be to walk
> > through the path (os.getenv("PATH")).  With other words, write a
> > function which does the same as the UNIX which command.
> >
> > Note that paths are separated by ";" on Windows instead of ":".
>
> this is indeed a good test, here i normally use:
>
> if string.find(os.getenv("PATH"),";") then
>    -- windows
or OS/2

> else
>    -- unix
> end
>
I know that OS/2 (eComStation) is not yet supported in TL but thinking
to the future this more extensive test should work:

if string.find(os.getenv("PATH"), ";") then
  if string.find(os.getenv("PATH"), "\\OS2\\") then
    -- OS/2
  else
    -- windows
  end
else
  -- unix
end

> doing an os.execute is an unneccessary slow alternative
>
> Hans
>
>
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                               | www.pragma-pod.nl
> -----------------------------------------------------------------
>


-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz


More information about the tex-live mailing list