Skip to content

Commit 113de5d

Browse files
committed
add workdir arg
1 parent b5478ed commit 113de5d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

xmake/modules/cli/archive.lua

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import("utils.archive.archive")
2626
local options = {
2727
{nil, "compress", "kv", nil, "Set the compress algorithm.", values = {"fastest", "faster", "default", "better", "best"}},
2828
{'r', "recurse", "k", nil, "Enable recursive pattern."},
29+
{'w', "workdir", "kv", nil, "Set the working directory."},
2930
{nil, "excludes", "kv", nil, "Set the excludes patterns.",
3031
"e.g.",
3132
" - xmake l cli.archive --excludes=\"*/dir/*|dir/*\" -o archivefile inputfiles"},
@@ -44,6 +45,7 @@ function main(...)
4445
local opt = {}
4546
opt.recurse = args.recurse
4647
opt.compress = args.compress
48+
opt.curdir = args.workdir
4749
if args.excludes then
4850
opt.excludes = args.excludes:split("|")
4951
end

xmake/modules/cli/extract.lua

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import("utils.archive.extract")
2424

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

4243
local opt = {}
4344
opt.recurse = args.recurse
45+
opt.curdir = args.workdir
4446
if args.excludes then
4547
opt.excludes = args.excludes:split("|")
4648
end

0 commit comments

Comments
 (0)