[Dev-luatex] arg[0] / texlua

Patrick Gundlach patrick at gundla.ch
Sat Dec 11 17:32:09 CET 2010


when I have a script that starts with the line

#!/usr/bin/env texlua

I have on my Mac OS X system the full path to my script in arg[0]. Is this portable? That is, if I run this under windows/solaris/... will I always find out where this script is located?

Or other question: is there a more-or-less portable way to find out the location of a script from inside the script? I'd like to set up package.path to a relative directory such as:

package.path = .... <relative to this file, not the $PWD>

require "mylib"



More information about the dev-luatex mailing list