diff --git a/.gitignore b/.gitignore index 9d27373..8abdc28 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ *.rej # html files (as generated from markdown) -style.css *.html # checksums file as used by $ScriptInstallUpdate diff --git a/Makefile b/Makefile index bff5458..0265a51 100644 --- a/Makefile +++ b/Makefile @@ -7,14 +7,11 @@ LOCAL = $(wildcard *.local.rsc) WIFI = $(wildcard *.wifi.rsc) MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) -HTML = $(MARKDOWN:.md=.html) style.css +HTML = $(MARKDOWN:.md=.html) all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json -style.css: contrib/general/style.css - cp $< $@ - -%.html: %.md style.css contrib/html.sh contrib/html.sh.d/head.html +%.html: %.md contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh $< > $@ %.capsman.rsc: %.template.rsc Makefile @@ -36,7 +33,7 @@ style.css: contrib/general/style.css < $< > $@ checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh > $@ + contrib/checksums.sh clean: rm -f $(HTML) checksums.json diff --git a/contrib/checksums.sh b/contrib/checksums.sh index ab4e973..b472b49 100755 --- a/contrib/checksums.sh +++ b/contrib/checksums.sh @@ -6,4 +6,4 @@ set -e md5sum $(find -name '*.rsc' | sort) | \ sed -e "s| \./||" -e 's|.rsc$||' | \ - jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' + jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' > 'checksums.json' diff --git a/contrib/general/style.css b/contrib/general/style.css index d0cb371..0416e45 100644 --- a/contrib/general/style.css +++ b/contrib/general/style.css @@ -1,4 +1,3 @@ -/* stylesheet for RouterOS Scripts */ body { font-family: fira-sans, sans-serif; font-size: 10pt; diff --git a/contrib/html.sh b/contrib/html.sh index 3b5b420..f1ee70c 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -5,7 +5,7 @@ set -e RELTO="$(dirname "${1}")" sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ - -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" style.css)|" \ + -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" contrib/general/style.css)|" \ -e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 0ce3ff7..18d1320 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -2,5 +2,5 @@