diff options
| author | ruki <[email protected]> | 2017-09-27 23:19:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-27 13:59:10 +0800 |
| commit | bee50fa70e44973ff43d2c6adeb96a18f4b38148 (patch) | |
| tree | d70e4d2a28216793d65c0f79e936fcad5b71b17b /xmake/actions/require/environment.lua | |
| parent | ca581595f689b8ec3de720560ab3946745889936 (diff) | |
fix repo environment
Diffstat (limited to 'xmake/actions/require/environment.lua')
| -rw-r--r-- | xmake/actions/require/environment.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/actions/require/environment.lua b/xmake/actions/require/environment.lua index bbbe1e587..7c6bdfc68 100644 --- a/xmake/actions/require/environment.lua +++ b/xmake/actions/require/environment.lua @@ -24,6 +24,8 @@ -- imports import("core.platform.environment") +import("lib.detect.find_tool") +import("package") -- enter environment -- @@ -36,6 +38,11 @@ function enter() -- set search pathes of toolchains environment.enter("toolchains") + -- git not found? install it first + if not find_tool("git") then + package.install_packages("git") + end + -- TODO set toolchains for CC, LD, .. -- TODO set flags of toolchains |
