21 lines
474 B
Python
21 lines
474 B
Python
#!/usr/bin/env python3
|
|
import sys
|
|
|
|
|
|
def usage() -> str:
|
|
return "Usage:\n python scripts/playbook.py -config <path>\n python scripts/playbook.py -h"
|
|
|
|
|
|
def main(argv: list[str]) -> int:
|
|
if "-h" in argv or "-help" in argv:
|
|
print(usage())
|
|
return 0
|
|
if "-config" not in argv:
|
|
print("ERROR: -config is required.\n" + usage(), file=sys.stderr)
|
|
return 2
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main(sys.argv[1:]))
|