From b833fc36987e0b2fde4cf661319015acdbdca595 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 12 Nov 2025 18:22:35 +0100 Subject: [PATCH] contrib/template-wifi: split off from Makefile --- Makefile | 7 ++----- contrib/template-wifi.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100755 contrib/template-wifi.sh diff --git a/Makefile b/Makefile index 6a566b3..50ab9ed 100644 --- a/Makefile +++ b/Makefile @@ -34,11 +34,8 @@ rsc: $(GEN_RSC) %.local.rsc: %.template.rsc contrib/template-local.sh contrib/template-local.sh $< > $@ -%.wifi.rsc: %.template.rsc Makefile - 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!' \ - < $< > $@ +%.wifi.rsc: %.template.rsc contrib/template-wifi.sh + contrib/template-wifi.sh $< > $@ clean: rm -f $(HTML) checksums.json diff --git a/contrib/template-wifi.sh b/contrib/template-wifi.sh new file mode 100755 index 0000000..8d48ada --- /dev/null +++ b/contrib/template-wifi.sh @@ -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}"