11 lines
429 B
Python
Executable File
11 lines
429 B
Python
Executable File
#!/usr/bin/env python3
|
|
import sys, json, os
|
|
META = "repo_meta.json"
|
|
REQ = ["url", "license"]
|
|
def fail(msg): print(f"[meta-check] {msg}", file=sys.stderr); sys.exit(1)
|
|
if not os.path.exists(META): fail(f"{META} not found.")
|
|
m = json.load(open(META, "r", encoding="utf-8"))
|
|
missing = [k for k in REQ if not m.get(k)]
|
|
if missing: fail("Missing required fields: " + ", ".join(missing))
|
|
print("[meta-check] repo_meta.json looks OK.")
|