Add connection for mount command
This commit is contained in:
@@ -47,6 +47,19 @@ def parse_args() -> tuple[argparse.Namespace, argparse.ArgumentParser]:
|
||||
'target', nargs='?', help='Archive index (int) or name (str)'
|
||||
)
|
||||
|
||||
# mount
|
||||
mount_parser = subparsers.add_parser(
|
||||
'mount', help='Mount a backup or backups'
|
||||
)
|
||||
mount_parser.add_argument(
|
||||
'archive',
|
||||
nargs='?',
|
||||
help='Archive index (int) or name (str), omit to mount all',
|
||||
)
|
||||
mount_parser.add_argument(
|
||||
'mountpoint', help='Directory to mount the archive'
|
||||
)
|
||||
|
||||
return parser.parse_args(), parser
|
||||
|
||||
|
||||
@@ -66,6 +79,10 @@ def main() -> int:
|
||||
from .list import run_list
|
||||
|
||||
return run_list(args)
|
||||
case 'mount':
|
||||
from .mount import run_mount
|
||||
|
||||
return run_mount(args)
|
||||
case _:
|
||||
parser.print_help()
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user