#!/usr/bin/env python3 """兼容入口:等价于 navctl.py install(保留 --repo / --dir / -y 参数)。""" from __future__ import annotations import sys from pathlib import Path SCRIPT_DIR = Path(__file__).resolve().parent if str(SCRIPT_DIR) not in sys.path: sys.path.insert(0, str(SCRIPT_DIR)) from navctl import action_install, main, parse_args # noqa: E402 if __name__ == "__main__": args = parse_args() if args.command in (None, "install"): action_install(repo=args.repo, dest=args.dir, yes=args.yes) else: main()