From 1958d47209de46f6a71f6963dcd45b127f7cef1b Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 28 Feb 2022 22:36:54 +0800 Subject: improve xrepo install/fetch --- xmake/modules/private/xrepo/action/fetch.lua | 2 +- xmake/modules/private/xrepo/action/install.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/modules/private/xrepo/action/fetch.lua b/xmake/modules/private/xrepo/action/fetch.lua index 686f6d95a..a114f2fca 100644 --- a/xmake/modules/private/xrepo/action/fetch.lua +++ b/xmake/modules/private/xrepo/action/fetch.lua @@ -118,7 +118,7 @@ function _fetch_packages(packages) end if packagefile then assert(os.isfile("xmake.lua"), "xmake.lua not found!") - os.cp(packagefile, "xmake.lua") + io.writefile("xmake.lua", "includes(\"" .. packagefile .. "\")\n" .. io.readfile("xmake.lua")) end -- do configure first diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua index fbe6965ed..4dd21ca07 100644 --- a/xmake/modules/private/xrepo/action/install.lua +++ b/xmake/modules/private/xrepo/action/install.lua @@ -133,7 +133,7 @@ function _install_packages(packages) end if packagefile then assert(os.isfile("xmake.lua"), "xmake.lua not found!") - os.cp(packagefile, "xmake.lua") + io.writefile("xmake.lua", "includes(\"" .. packagefile .. "\")\n" .. io.readfile("xmake.lua")) end -- disable xmake-stats -- cgit v1.3.1