File tree Expand file tree Collapse file tree
share/https-dns-proxy/providers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 Version: $(PKG_VERSION ) -$(PKG_RELEASE )
2323endef
2424
25+ # Consolidate individual provider JSON files into providers.json in the build tree.
26+ # luci.mk's Build/Prepare calls Build/Prepare/$(LUCI_NAME) as a per-package hook.
27+ # The merged file lands in root/ so luci.mk's install step copies it automatically.
28+ define Build/Prepare/luci-app-https-dns-proxy
29+ @if [ -d $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers ] \
30+ && ls $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers/*.json >/dev/null 2>&1; then \
31+ sep=''; printf '[' > $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers.json; \
32+ for f in $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers/*.json; do \
33+ printf '%s' "$$$$sep" >> $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers.json; \
34+ cat "$$$$f" >> $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers.json; \
35+ sep=','; \
36+ done; \
37+ printf ']' >> $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers.json; \
38+ fi
39+ @if grep -q '"title"' $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers.json 2>/dev/null; then \
40+ rm -rf $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers; \
41+ else \
42+ rm -f $(PKG_BUILD_DIR ) /root/usr/share/https-dns-proxy/providers.json; \
43+ fi
44+ endef
45+
2546include ../../luci.mk
2647
2748# call BuildPackage - OpenWrt buildroot signature
You can’t perform that action at this time.
0 commit comments