summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-20 00:46:23 +0800
committerruki <[email protected]>2018-09-19 22:38:21 +0800
commitd7dcb3abd119f97928b1bfd8fa22d6832237c178 (patch)
tree9b77cec8326c79ab26303d31b83fc106481a48b7
parent739a7a39c368a78f775a8988fd392eb9347a494e (diff)
improve git script
-rw-r--r--xmake/repository/packages/c/cmake/xmake.lua2
-rw-r--r--xmake/repository/packages/g/git/xmake.lua5
2 files changed, 2 insertions, 5 deletions
diff --git a/xmake/repository/packages/c/cmake/xmake.lua b/xmake/repository/packages/c/cmake/xmake.lua
index 48ad61419..5a8eedac4 100644
--- a/xmake/repository/packages/c/cmake/xmake.lua
+++ b/xmake/repository/packages/c/cmake/xmake.lua
@@ -11,7 +11,7 @@ package("cmake")
add_urls("https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.tar.gz")
add_versions("3.11.4", "6dab016a6b82082b8bcd0f4d1e53418d6372015dd983d29367b9153f1a376435")
elseif is_host("windows") then
- if is_arch("x64") then
+ if os.arch() == "x64" then
add_urls("https://cmake.org/files/v3.11/cmake-3.11.4-win64-x64.zip")
add_versions("3.11.4", "d3102abd0ded446c898252b58857871ee170312d8e7fd5cbff01fbcb1068a6e5")
else
diff --git a/xmake/repository/packages/g/git/xmake.lua b/xmake/repository/packages/g/git/xmake.lua
index af6e88deb..a734ed7a1 100644
--- a/xmake/repository/packages/g/git/xmake.lua
+++ b/xmake/repository/packages/g/git/xmake.lua
@@ -27,11 +27,8 @@ package("git")
on_install("windows", function (package)
- -- imports
- import("core.base.global")
-
-- install winenv with git
- local winenv_dir = path.join(global.directory(), "winenv")
+ local winenv_dir = path.join(val("globaldir"), "winenv")
os.mkdir(winenv_dir)
os.cp("*", winenv_dir)