34 lines
825 B
Python
Executable File
34 lines
825 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Compatibility wrapper for `bootstrap cli export|verify`."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
from bootstrap_lib import DEFAULT_OUTPUT
|
|
from cli import cmd_export, cmd_verify
|
|
|
|
|
|
def main() -> int:
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
parser.add_argument(
|
|
"--output",
|
|
type=Path,
|
|
default=DEFAULT_OUTPUT,
|
|
help="Export directory. Must end in bootstrap/exports/generic.",
|
|
)
|
|
parser.add_argument(
|
|
"--verify-only",
|
|
action="store_true",
|
|
help="Verify an existing export without regenerating it.",
|
|
)
|
|
args = parser.parse_args()
|
|
if args.verify_only:
|
|
return cmd_verify(args)
|
|
return cmd_export(args)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|