diff --git a/src/python/jw/pkg/cmds/posix/CmdCopy.py b/src/python/jw/pkg/cmds/posix/CmdCopy.py index aa578b64..96014c79 100644 --- a/src/python/jw/pkg/cmds/posix/CmdCopy.py +++ b/src/python/jw/pkg/cmds/posix/CmdCopy.py @@ -33,6 +33,11 @@ class CmdCopy(Cmd): # export action = 'store_true', help = 'Copy directories recursively', ) + parser.add_argument( + '--parents', + action = 'store_true', + help = 'Land a single object at its source path below the destination root', + ) parser.add_argument( '-F', '--fixed-strings', @@ -61,4 +66,5 @@ class CmdCopy(Cmd): # export # -- A mode is given as a string, if at all mode = int(args.mode, 0) if args.mode is not None else None, recursive = args.recursive, + parents = args.parents, ) diff --git a/test/integration/jw_pkg/help/test-expected.txt b/test/integration/jw_pkg/help/test-expected.txt index 0b0c0b39..9c2e5f12 100644 --- a/test/integration/jw_pkg/help/test-expected.txt +++ b/test/integration/jw_pkg/help/test-expected.txt @@ -186,7 +186,8 @@ Available subcommands of posix: copy Copy files tar Handle tar archives ============= Running: jw-pkg.py -t ../../../.. --log-level info posix copy --help -usage: jw-pkg.py posix copy [-h] [-o OWNER] [-g GROUP] [-m MODE] [-r] [-F] +usage: jw-pkg.py posix copy [-h] [-o OWNER] [-g GROUP] [-m MODE] [-r] + [--parents] [-F] src dst Copy files @@ -201,6 +202,8 @@ options: -g, --group GROUP Destination file group (default: None) -m, --mode MODE Destination file mode (default: None) -r, --recursive Copy directories recursively (default: False) + --parents Land a single object at its source path below the + destination root (default: False) -F, --fixed-strings Don't expand macros in and (default: False) ============= Running: jw-pkg.py -t ../../../.. --log-level info posix tar --help usage: jw-pkg.py posix tar [-h] ...