⛅ Sync 2026-10-11 13:16:00

This commit is contained in:
github-actions[bot] committed 2026-10-11 13:16:00 +08:00
1 parent 705dadd362
commit e6d1b4e2d7
105 files changed
+26511 -50

No files matched your search

@@ -0,0 +1,27 @@
#!/usr/bin/env python3
"""Select the plugin and Chinese translation without the SDK's all-package defaults."""
import pathlib
import re
import sys
def configure(directory):
directory = pathlib.Path(directory)
if not (directory / "rules.mk").is_file() or not (directory / "Makefile").is_file():
raise ValueError("Expected an OpenWrt SDK directory")
config = directory / ".config"
lines = config.read_text().splitlines() if config.exists() else []
pattern = r"(?:# )?CONFIG_(?:ALL(?:_NONSHARED|_KMODS)?\b|PACKAGE_|LUCI_LANG_)"
retained = [line for line in lines if not re.match(pattern, line)]
selected = [
"# CONFIG_ALL is not set", "# CONFIG_ALL_NONSHARED is not set", "# CONFIG_ALL_KMODS is not set",
"CONFIG_PACKAGE_luci-app-device-manager=m", "CONFIG_LUCI_LANG_zh_Hans=y",
"CONFIG_PACKAGE_luci-i18n-device-manager-zh-cn=m",
]
config.write_text("\n".join(retained + selected) + "\n")
if __name__ == "__main__":
if len(sys.argv) != 2:
sys.exit("Usage: configure-sdk.py <sdk-directory>")
configure(sys.argv[1])