contrib/template-wifi: split off from Makefile

This commit is contained in:
Christian Hesse 2025-11-12 18:22:35 +01:00
parent a585dbc537
commit b833fc3698
2 changed files with 10 additions and 5 deletions

View file

@ -34,11 +34,8 @@ rsc: $(GEN_RSC)
%.local.rsc: %.template.rsc contrib/template-local.sh %.local.rsc: %.template.rsc contrib/template-local.sh
contrib/template-local.sh $< > $@ contrib/template-local.sh $< > $@
%.wifi.rsc: %.template.rsc Makefile %.wifi.rsc: %.template.rsc contrib/template-wifi.sh
sed -e '/\/caps-man\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.wifi|' \ contrib/template-wifi.sh $< > $@
-e '/^# NOT \/interface\/wifi\/ #$$/,/^# NOT \/interface\/wifi\/ #$$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< $< > $@
clean: clean:
rm -f $(HTML) checksums.json rm -f $(HTML) checksums.json

8
contrib/template-wifi.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
set -e
sed -e '/\/caps-man\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.wifi|' \
-e '/^# NOT \/interface\/wifi\/ #$/,/^# NOT \/interface\/wifi\/ #$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< "${1}"