summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-01-31 21:17:00 +0100
committerHans Hagen <pragma@wxs.nl>2011-01-31 21:17:00 +0100
commit795e773a34bec2cdc23022d412e30c0d075f021f (patch)
tree52e8dc4133e15afbb1f11b08eb01fd3fecc1880f /scripts
parenta54b055aa4688508e8f0806eb5f776b353fbb03b (diff)
downloadcontext-795e773a34bec2cdc23022d412e30c0d075f021f.tar.gz
beta 2011.01.31 21:17
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua13
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua13
-rwxr-xr-xscripts/context/stubs/unix/mtxrun13
3 files changed, 24 insertions, 15 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index bf3a4453e..2b6a6c9f1 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -1989,6 +1989,7 @@ if not modules then modules = { } end modules ['l-os'] = {
local os = os
local find, format, gsub, upper = string.find, string.format, string.gsub, string.upper
+local concat = table.concat
local random, ceil = math.random, math.ceil
local rawget, rawset, type, getmetatable, setmetatable, tonumber = rawget, rawset, type, getmetatable, setmetatable, tonumber
@@ -2012,6 +2013,9 @@ if not os.__getenv__ then
end
local K = upper(k)
osenv[K] = v
+ if type(v) == "table" then
+ v = concat(v,";") -- path
+ end
ossetenv(K,v)
end
@@ -9909,11 +9913,6 @@ local relations = allocate { -- todo: handlers also here
variable = 'OPLFONTS',
suffixes = { 'opl' },
},
- otp = {
- names = { "otp" },
- variable = 'OTPINPUTS',
- suffixes = { 'otp' },
- },
ovp = {
names = { "ovp" },
variable = 'OVPFONTS',
@@ -10130,6 +10129,7 @@ local function identify()
for k=1,#texmfcaches do
local cachepath = texmfcaches[k]
if cachepath ~= "" then
+ cachepath = resolvers.resolve(cachepath)
cachepath = resolvers.cleanpath(cachepath)
cachepath = file.collapsepath(cachepath)
local valid = isdir(cachepath)
@@ -10164,6 +10164,7 @@ local function identify()
local cachepath = texmfcaches[k]
cachepath = resolvers.getenv(cachepath)
if cachepath ~= "" then
+ cachepath = resolvers.resolve(cachepath)
cachepath = resolvers.cleanpath(cachepath)
local valid = isdir(cachepath)
if valid and file.is_readable(cachepath) then
@@ -11158,6 +11159,8 @@ function resolvers.expandvariables()
end
end
+
+
function resolvers.variable(name)
return entry(instance.variables,name)
end
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index bf3a4453e..2b6a6c9f1 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -1989,6 +1989,7 @@ if not modules then modules = { } end modules ['l-os'] = {
local os = os
local find, format, gsub, upper = string.find, string.format, string.gsub, string.upper
+local concat = table.concat
local random, ceil = math.random, math.ceil
local rawget, rawset, type, getmetatable, setmetatable, tonumber = rawget, rawset, type, getmetatable, setmetatable, tonumber
@@ -2012,6 +2013,9 @@ if not os.__getenv__ then
end
local K = upper(k)
osenv[K] = v
+ if type(v) == "table" then
+ v = concat(v,";") -- path
+ end
ossetenv(K,v)
end
@@ -9909,11 +9913,6 @@ local relations = allocate { -- todo: handlers also here
variable = 'OPLFONTS',
suffixes = { 'opl' },
},
- otp = {
- names = { "otp" },
- variable = 'OTPINPUTS',
- suffixes = { 'otp' },
- },
ovp = {
names = { "ovp" },
variable = 'OVPFONTS',
@@ -10130,6 +10129,7 @@ local function identify()
for k=1,#texmfcaches do
local cachepath = texmfcaches[k]
if cachepath ~= "" then
+ cachepath = resolvers.resolve(cachepath)
cachepath = resolvers.cleanpath(cachepath)
cachepath = file.collapsepath(cachepath)
local valid = isdir(cachepath)
@@ -10164,6 +10164,7 @@ local function identify()
local cachepath = texmfcaches[k]
cachepath = resolvers.getenv(cachepath)
if cachepath ~= "" then
+ cachepath = resolvers.resolve(cachepath)
cachepath = resolvers.cleanpath(cachepath)
local valid = isdir(cachepath)
if valid and file.is_readable(cachepath) then
@@ -11158,6 +11159,8 @@ function resolvers.expandvariables()
end
end
+
+
function resolvers.variable(name)
return entry(instance.variables,name)
end
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index bf3a4453e..2b6a6c9f1 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -1989,6 +1989,7 @@ if not modules then modules = { } end modules ['l-os'] = {
local os = os
local find, format, gsub, upper = string.find, string.format, string.gsub, string.upper
+local concat = table.concat
local random, ceil = math.random, math.ceil
local rawget, rawset, type, getmetatable, setmetatable, tonumber = rawget, rawset, type, getmetatable, setmetatable, tonumber
@@ -2012,6 +2013,9 @@ if not os.__getenv__ then
end
local K = upper(k)
osenv[K] = v
+ if type(v) == "table" then
+ v = concat(v,";") -- path
+ end
ossetenv(K,v)
end
@@ -9909,11 +9913,6 @@ local relations = allocate { -- todo: handlers also here
variable = 'OPLFONTS',
suffixes = { 'opl' },
},
- otp = {
- names = { "otp" },
- variable = 'OTPINPUTS',
- suffixes = { 'otp' },
- },
ovp = {
names = { "ovp" },
variable = 'OVPFONTS',
@@ -10130,6 +10129,7 @@ local function identify()
for k=1,#texmfcaches do
local cachepath = texmfcaches[k]
if cachepath ~= "" then
+ cachepath = resolvers.resolve(cachepath)
cachepath = resolvers.cleanpath(cachepath)
cachepath = file.collapsepath(cachepath)
local valid = isdir(cachepath)
@@ -10164,6 +10164,7 @@ local function identify()
local cachepath = texmfcaches[k]
cachepath = resolvers.getenv(cachepath)
if cachepath ~= "" then
+ cachepath = resolvers.resolve(cachepath)
cachepath = resolvers.cleanpath(cachepath)
local valid = isdir(cachepath)
if valid and file.is_readable(cachepath) then
@@ -11158,6 +11159,8 @@ function resolvers.expandvariables()
end
end
+
+
function resolvers.variable(name)
return entry(instance.variables,name)
end