Add connection for mount command

This commit is contained in:
Alexander Wainwright
2025-06-24 13:10:20 +10:00
parent 2ab5a07b00
commit 2f45f4e5d8

View File

@@ -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