summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-23 16:08:08 +0800
committerGitHub <[email protected]>2023-11-23 16:08:08 +0800
commit6b400aa1f7a578694079ccb84813a02192cb28e6 (patch)
tree0a557d8e8f9d0a047895ebd9d42820e85d4dc89e /xmake
parent401d67ca9824632d1531889a6261f458fa161c4c (diff)
parentb83dfc02b51b0c0538d547d3247c6e3246653f5b (diff)
Merge pull request #4416 from xmake-io/xmakesrc
improve xmakesrc pack
Diffstat (limited to 'xmake')
-rw-r--r--xmake/modules/utils/archive/archive.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/utils/archive/archive.lua b/xmake/modules/utils/archive/archive.lua
index aba6403d3..d21203368 100644
--- a/xmake/modules/utils/archive/archive.lua
+++ b/xmake/modules/utils/archive/archive.lua
@@ -330,6 +330,12 @@ function main(archivefile, inputfiles, opt)
-- get extension
local extension = opt.extension or get_archive_extension(archivefile)
+ -- ensure output directory
+ local archivedir = path.directory(archivefile)
+ if not os.isdir(archivedir) then
+ os.mkdir(archivedir)
+ end
+
-- archive it
return _archive(archivefile, inputfiles, extension, archivers[extension], opt)
end