summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-23 22:54:44 +0800
committerruki <[email protected]>2023-11-23 22:54:44 +0800
commitac1fc1f6e3b62960d5cf7c01c6779cb3e1b2b838 (patch)
treeca66275bb7cae50cbc884b038b39e7824a2380e3 /xmake/modules
parent401d67ca9824632d1531889a6261f458fa161c4c (diff)
improve xmakesrc pack
Diffstat (limited to 'xmake/modules')
-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