mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
contrib/template-capsman: split off from Makefile
This commit is contained in:
parent
734d957846
commit
4fc382c78d
2 changed files with 13 additions and 5 deletions
7
Makefile
7
Makefile
|
|
@ -28,11 +28,8 @@ docs: $(HTML)
|
|||
|
||||
rsc: $(GEN_RSC)
|
||||
|
||||
%.capsman.rsc: %.template.rsc Makefile
|
||||
sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \
|
||||
-e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \
|
||||
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
||||
< $< > $@
|
||||
%.capsman.rsc: %.template.rsc contrib/template-capsman.sh
|
||||
contrib/template-capsman.sh $< > $@
|
||||
|
||||
%.local.rsc: %.template.rsc Makefile
|
||||
sed -e '/\/caps-man\//d' -e '/\/interface\/wifi\//d' -e 's|%TEMPL%|.local|' \
|
||||
|
|
|
|||
11
contrib/template-capsman.sh
Executable file
11
contrib/template-capsman.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
sed \
|
||||
-e '/\/interface\/wifi\//d' \
|
||||
-e '/\/interface\/wireless\//d' \
|
||||
-e 's|%TEMPL%|.capsman|' \
|
||||
-e '/^# NOT \/caps-man\/ #$/,/^# NOT \/caps-man\/ #$/d' \
|
||||
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
||||
< "${1}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue