diff options
| -rw-r--r-- | xmake/actions/require/action/install.lua | 14 | ||||
| -rw-r--r-- | xmake/packages/git/xmake.lua | 1 |
2 files changed, 9 insertions, 6 deletions
diff --git a/xmake/actions/require/action/install.lua b/xmake/actions/require/action/install.lua index 3f7bc0caa..5ca529ef8 100644 --- a/xmake/actions/require/action/install.lua +++ b/xmake/actions/require/action/install.lua @@ -198,12 +198,16 @@ function main(package) -- get working directory of this package local workdir = package:cachedir() - -- TODO - -- enter source files directory + -- enter the working directory local oldir = nil - for _, srcdir in ipairs(os.dirs(path.join(workdir, "source", "*"))) do - oldir = os.cd(srcdir) - break + if #package:urls() > 0 then + for _, srcdir in ipairs(os.dirs(path.join(workdir, "source", "*"))) do + oldir = os.cd(srcdir) + break + end + else + os.mkdir(workdir) + oldir = os.cd(workdir) end -- init tipname diff --git a/xmake/packages/git/xmake.lua b/xmake/packages/git/xmake.lua index f2112ee8c..529de378e 100644 --- a/xmake/packages/git/xmake.lua +++ b/xmake/packages/git/xmake.lua @@ -9,7 +9,6 @@ package("git") end) on_install(function (package) - print("install git") -- package_manager.install("git") end) |
