blob: 0c1d92911aa14afb6f38dd45e83d50bf666e817b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
-- filename : l-os.lua
-- comment : split off from luat-lib
-- author : Hans Hagen, PRAGMA-ADE, Hasselt NL
-- copyright: PRAGMA ADE / ConTeXt Development Team
-- license : see context related readme files
if not versions then versions = { } end versions['l-os'] = 1.001
function os.resultof(command)
return io.popen(command,"r"):read("*all")
end
--~ if not os.exec then -- still not ok
os.exec = os.execute
--~ end
function os.launch(str)
if os.platform == "windows" then
os.execute("start " .. str)
else
os.execute(str .. " &")
end
end
if not os.setenv then
function os.setenv() return false end
end
|