Enable token expansion for os.execute()
This commit is contained in:
parent
d645ba7c8f
commit
a04f7e72ae
@ -5,20 +5,22 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
|
|
||||||
--
|
---
|
||||||
-- Add a path normalization step to the execution command to
|
-- Extend Lua's built-in os.execute() with token expansion and
|
||||||
-- replace special symbols and any scripted weirdness.
|
-- path normalization.
|
||||||
--
|
--
|
||||||
|
|
||||||
premake.override(os, "execute", function(base, cmd)
|
premake.override(os, "execute", function(base, cmd)
|
||||||
cmd = path.normalize(cmd)
|
cmd = path.normalize(cmd)
|
||||||
|
cmd = os.translateCommand(cmd)
|
||||||
return base(cmd)
|
return base(cmd)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
|
---
|
||||||
-- Same as os.execute(), but accepts string formatting arguments.
|
-- Same as os.execute(), but accepts string formatting arguments.
|
||||||
--
|
---
|
||||||
|
|
||||||
function os.executef(cmd, ...)
|
function os.executef(cmd, ...)
|
||||||
cmd = string.format(cmd, unpack(arg))
|
cmd = string.format(cmd, unpack(arg))
|
||||||
|
Loading…
Reference in New Issue
Block a user