Skip to content

Commit

Permalink
add workdir arg
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 21, 2024
1 parent b5478ed commit 113de5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xmake/modules/cli/archive.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import("utils.archive.archive")
local options = {
{nil, "compress", "kv", nil, "Set the compress algorithm.", values = {"fastest", "faster", "default", "better", "best"}},
{'r', "recurse", "k", nil, "Enable recursive pattern."},
{'w', "workdir", "kv", nil, "Set the working directory."},
{nil, "excludes", "kv", nil, "Set the excludes patterns.",
"e.g.",
" - xmake l cli.archive --excludes=\"*/dir/*|dir/*\" -o archivefile inputfiles"},
Expand All @@ -44,6 +45,7 @@ function main(...)
local opt = {}
opt.recurse = args.recurse
opt.compress = args.compress
opt.curdir = args.workdir
if args.excludes then
opt.excludes = args.excludes:split("|")
end
Expand Down
2 changes: 2 additions & 0 deletions xmake/modules/cli/extract.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import("utils.archive.extract")

-- the options
local options = {
{'w', "workdir", "kv", nil, "Set the working directory."},
{nil, "excludes", "kv", nil, "Set the excludes patterns.",
"e.g.",
" - xmake l cli.extract --excludes=\"*/dir/*|dir/*\" -o outputdir archivefile"},
Expand All @@ -41,6 +42,7 @@ function main(...)

local opt = {}
opt.recurse = args.recurse
opt.curdir = args.workdir
if args.excludes then
opt.excludes = args.excludes:split("|")
end
Expand Down

0 comments on commit 113de5d

Please sign in to comment.