diff options
| author | ruki <[email protected]> | 2017-05-17 13:05:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-17 13:05:20 +0800 |
| commit | 5b5b05522da5ea1834e14de2bc5b9029c53bd422 (patch) | |
| tree | 7584c339be4514f5990e3629deecb0458b9b0949 /xmake/core/base/os.lua | |
| parent | cfb1dd7f7b3ece03825c686651c2f88ac65b33d5 (diff) | |
use which to find program
Diffstat (limited to 'xmake/core/base/os.lua')
| -rw-r--r-- | xmake/core/base/os.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index c78d41c67..8f3e32ecb 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -589,7 +589,7 @@ function os.isexec(filepath) -- check permission -- is *.exe for windows? - if xmake._HOST == "windows" and not filepath:find("%.exe") then + if os.host() == "windows" and not filepath:find("%.exe") then filepath = filepath .. ".exe" end @@ -597,6 +597,21 @@ function os.isexec(filepath) return os.isfile(filepath) end +-- get the system host +function os.host() + return xmake._HOST +end + +-- get the system architecture +function os.arch() + return xmake._ARCH +end + +-- get the system null device +function os.nuldev() + return xmake._NULDEV +end + -- get version info function os.versioninfo() |
