hikyuu2/scripts/before_install.lua

25 lines
680 B
Lua
Raw Normal View History

import("core.platform.platform")
import("core.base.option")
function main(target)
if target:isphony() then
return
end
local targetname = target:name()
if "_hikyuu" ~= targetname then
return
end
local installdir = option.get("installdir") or os.getenv("INSTALLDIR") or os.getenv("DESTDIR") or platform.get("installdir")
if is_plat("windows") then
os.exec("xcopy /S /Q /Y /I hikyuu %s", os.args(installdir))
2018-09-19 02:45:50 +08:00
end
if is_plat("linux") then
2019-04-18 23:14:58 +08:00
os.exec("cp -f -r -T hikyuu %s", os.args(installdir))
end
2018-09-19 02:45:50 +08:00
if is_plat("macosx") then
os.exec("cp -f -r hikyuu/* %s", os.args(installdir))
2018-09-19 02:45:50 +08:00
end
end