mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-04-21 20:49:37 +00:00
Compare commits
1 commit
2462ec2f04
...
3e58d389ce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e58d389ce |
2 changed files with 10 additions and 22 deletions
25
Makefile
25
Makefile
|
|
@ -2,22 +2,14 @@
|
||||||
# template scripts -> final scripts
|
# template scripts -> final scripts
|
||||||
# markdown files -> html files
|
# markdown files -> html files
|
||||||
|
|
||||||
ALL_RSC := $(wildcard *.rsc */*.rsc)
|
CAPSMAN = $(wildcard *.capsman.rsc)
|
||||||
GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc)
|
LOCAL = $(wildcard *.local.rsc)
|
||||||
|
WIFI = $(wildcard *.wifi.rsc)
|
||||||
|
|
||||||
MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md)
|
MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md)
|
||||||
HTML := $(MARKDOWN:.md=.html) style.css
|
HTML = $(MARKDOWN:.md=.html) style.css
|
||||||
|
|
||||||
.PHONY: all checksums docs rsc clean
|
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json
|
||||||
|
|
||||||
all: checksums docs rsc
|
|
||||||
|
|
||||||
checksums: checksums.json
|
|
||||||
|
|
||||||
checksums.json: contrib/checksums.sh $(ALL_RSC)
|
|
||||||
contrib/checksums.sh > $@
|
|
||||||
|
|
||||||
docs: $(HTML)
|
|
||||||
|
|
||||||
style.css: contrib/general/style.css
|
style.css: contrib/general/style.css
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
@ -25,8 +17,6 @@ style.css: contrib/general/style.css
|
||||||
%.html: %.md style.css contrib/html.sh contrib/html.sh.d/head.html
|
%.html: %.md style.css contrib/html.sh contrib/html.sh.d/head.html
|
||||||
contrib/html.sh $< > $@
|
contrib/html.sh $< > $@
|
||||||
|
|
||||||
rsc: $(GEN_RSC)
|
|
||||||
|
|
||||||
%.capsman.rsc: %.template.rsc Makefile
|
%.capsman.rsc: %.template.rsc Makefile
|
||||||
sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \
|
sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \
|
||||||
-e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \
|
-e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \
|
||||||
|
|
@ -45,5 +35,8 @@ rsc: $(GEN_RSC)
|
||||||
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
||||||
< $< > $@
|
< $< > $@
|
||||||
|
|
||||||
|
checksums.json: contrib/checksums.sh *.rsc */*.rsc
|
||||||
|
contrib/checksums.sh > $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(HTML) checksums.json
|
rm -f $(HTML) checksums.json
|
||||||
|
|
|
||||||
|
|
@ -1310,18 +1310,13 @@
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
$LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "': " . $Err);
|
$LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "': " . $Err);
|
||||||
:if ($Err != "Fetch failed with status 404") do={
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={
|
:if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={
|
||||||
$LogPrint warning $0 ("Removing dummy. Typo on installation?");
|
$LogPrint warning $0 ("Removing dummy. Typo on installation?");
|
||||||
/system/script/remove $Script;
|
/system/script/remove $Script;
|
||||||
}
|
}
|
||||||
:if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \
|
:if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \
|
||||||
[ :len $CheckSum ] = 0) do={
|
[ :len $CheckSum ] = 0) do={
|
||||||
$LogPrintOnce warning $0 \
|
$LogPrintOnce warning $0 ("Added the script manually? Skip updates with 'ignore=true' in comment.");
|
||||||
("Added the script manually? Skip updates with 'ignore=true' in comment.");
|
|
||||||
}
|
}
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue