On Mon, 05 Nov 2012 18:46:18 +0100, Hans Hagen <pra...@wxs.nl> wrote:
On 11/5/2012 12:15 AM, Sietse Brouwer wrote:
(2) why would mtxrun set the variables and risk overwriting something?
The comments suggest it is for the benefit of the cnf files, but still
--- why overwrite?
ossetenv("HOME", homedir) -- can be used in unix cnf files
ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files
Wouldn't be better to set the "HOME" variable ONLY in the case it has not been
defined?
If I keep the code mentioned by Sietse - "Below: relevant code from mtxrun, lines
11681-11696"
----
local homedir = --osgetenv(ostype == "windows" and 'USERPROFILE' or 'HOME')
or ''
osgetenv("HOME") or ostype == "windows" and
osgetenv('USERPROFILE') -- <- MY PROPOSAL HERE
if not homedir or homedir == "" then
homedir = char(127) -- we need a value, later we wil trigger on it
end
homedir = file.collapsepath(homedir)
ossetenv("HOME", homedir) -- can be used in unix cnf files
ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files
environment.homedir = homedir
----
Lukas
it just sets them local (for this run + subruns)
Hans
--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4
Tel: +420 244 062 238
Fax: +420 244 461 038
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________