summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-context.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-02-07 19:16:06 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-02-07 19:16:06 +0100
commit99dc1cd9bb77ac9fa68b0584f58f57749994fdba (patch)
treeab184c40b11270cec9c311beb0e190913471e47f /scripts/context/lua/mtx-context.lua
parent38a9804bf0448f3c987903d2601175f1750e9fe3 (diff)
downloadcontext-99dc1cd9bb77ac9fa68b0584f58f57749994fdba.tar.gz
2019-02-07 18:55:00
Diffstat (limited to 'scripts/context/lua/mtx-context.lua')
-rw-r--r--scripts/context/lua/mtx-context.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 2d93b8094..c50c4a77a 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -103,17 +103,17 @@ end
-- -- The way we use stubs will change in a bit in 2019 (mtxrun and context). We also normalize
-- -- the platforms to use a similar approach to this.
---
--- local engine_new = file.nameonly(getargument("engine") or directives.value("system.engine"))
--- local engine_old = file.nameonly(environment.ownbin)
---
--- local function restart(engine_old,engine_new)
--- local command = format("%s --luaonly %q %s --redirected",engine_new,environment.ownname,environment.reconstructcommandline())
--- report(format("redirect %s -> %s: %s",engine_old,engine_new,command))
--- local result = os.execute(command)
--- os.exit(result == 0 and 0 or 1)
--- end
---
+
+local engine_new = file.nameonly(getargument("engine") or directives.value("system.engine"))
+local engine_old = file.nameonly(environment.ownbin)
+
+local function restart(engine_old,engine_new)
+ local command = format("%s --luaonly %q %s --redirected",engine_new,environment.ownname,environment.reconstructcommandline())
+ report(format("redirect %s -> %s: %s",engine_old,engine_new,command))
+ local result = os.execute(command)
+ os.exit(result == 0 and 0 or 1)
+end
+
-- if getargument("redirected") then
-- setargument("engine",engine_old) -- later on we need this
-- elseif engine_new == engine_old then