mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 01:49:28 +00:00
contrib/template-local: split off from Makefile
This commit is contained in:
parent
1e0ccedac7
commit
a585dbc537
2 changed files with 10 additions and 5 deletions
7
Makefile
7
Makefile
|
|
@ -31,11 +31,8 @@ rsc: $(GEN_RSC)
|
|||
%.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|' \
|
||||
-e '/^# NOT \/interface\/wireless\/ #$$/,/^# NOT \/interface\/wireless\/ #$$/d' \
|
||||
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
||||
< $< > $@
|
||||
%.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|' \
|
||||
|
|
|
|||
8
contrib/template-local.sh
Executable file
8
contrib/template-local.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
sed -e '/\/caps-man\//d' -e '/\/interface\/wifi\//d' -e 's|%TEMPL%|.local|' \
|
||||
-e '/^# NOT \/interface\/wireless\/ #$/,/^# NOT \/interface\/wireless\/ #$/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