summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-01-31 22:20:13 +0200
committerMarius <mariausol@gmail.com>2011-01-31 22:20:13 +0200
commit7290ea25841bc7bcbb28a3eaea18f9bc74ca9f51 (patch)
tree3919e7b3328f7d7221c16462bb5c9130c627320d /scripts
parent8f0a9674137499392552a70d470f614f0eb98b6c (diff)
downloadcontext-7290ea25841bc7bcbb28a3eaea18f9bc74ca9f51.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
-rw-r--r--scripts/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 100644
--- 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