rename project to runaway

This commit is contained in:
2026-11-09 10:13:51 +08:00
parent 5857081832
commit c9feb8c05a
95 changed files with 1034 additions and 1034 deletions
+4 -4
View File
@@ -14,11 +14,11 @@ for tool in ("bash", "shellcheck"):
if not shutil.which(tool):
sys.exit(f"{tool} is required; install it before running make lint")
entrypoint = root / "unleash"
entrypoint = root / "runaway"
source = entrypoint.read_text()
loader = re.search(r"^for _lib in ([a-z_ ]+); do\n.*?^done$", source, re.M | re.S)
if not loader:
sys.exit("Cannot identify the module loader in unleash")
sys.exit("Cannot identify the module loader in runaway")
modules = [root / "lib" / (name + ".sh") for name in loader[1].split()]
if set(modules) != set((root / "lib").glob("*.sh")):
sys.exit("The module loader and library files do not match")
@@ -30,7 +30,7 @@ context = source[:loader.start()] + literal_sources
context += "\n" * loader[0].count("\n") + source[loader.end():]
examples = sorted((root / "examples").glob("*.sh"))
failed = False
for path in [entrypoint, *modules, *examples, root / "unleash-standalone.sh"]:
for path in [entrypoint, *modules, *examples, root / "runaway-standalone.sh"]:
result = subprocess.run(["bash", "-n", str(path)], check=False)
failed |= result.returncode != 0
@@ -39,7 +39,7 @@ with tempfile.NamedTemporaryFile(mode="w", suffix=".sh") as temporary:
temporary.flush()
result = subprocess.run([
"shellcheck", "--shell=bash", "--external-sources", "--check-sourced",
"--format=json", temporary.name, *map(str, examples), str(root / "unleash-standalone.sh"),
"--format=json", temporary.name, *map(str, examples), str(root / "runaway-standalone.sh"),
], capture_output=True, text=True, check=False)
if result.stderr:
print(result.stderr, file=sys.stderr, end="")