diff --git a/.gitignore b/.gitignore index 8abdc28..9d27373 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.rej # html files (as generated from markdown) +style.css *.html # checksums file as used by $ScriptInstallUpdate diff --git a/Makefile b/Makefile index 0265a51..bff5458 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,14 @@ LOCAL = $(wildcard *.local.rsc) WIFI = $(wildcard *.wifi.rsc) MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) -HTML = $(MARKDOWN:.md=.html) +HTML = $(MARKDOWN:.md=.html) style.css all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json -%.html: %.md contrib/html.sh contrib/html.sh.d/head.html +style.css: contrib/general/style.css + cp $< $@ + +%.html: %.md style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh $< > $@ %.capsman.rsc: %.template.rsc Makefile @@ -33,7 +36,7 @@ all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json < $< > $@ 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 b472b49..ab4e973 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' > 'checksums.json' + jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' diff --git a/contrib/general/style.css b/contrib/general/style.css index 0416e45..d0cb371 100644 --- a/contrib/general/style.css +++ b/contrib/general/style.css @@ -1,3 +1,4 @@ +/* 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 f1ee70c..3b5b420 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}" contrib/general/style.css)|" \ + -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" 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 18d1320..0ce3ff7 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -2,5 +2,5 @@ RouterOS Scripts :: __TITLE__ - + diff --git a/contrib/logo-color.html b/contrib/logo-color.html index e6bf962..78d19e6 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -2,7 +2,7 @@ RouterOS Scripts :: Logo Color Changer - + diff --git a/contrib/notification.html b/contrib/notification.html index ac76668..298e3bd 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -2,7 +2,7 @@ RouterOS Scripts :: Notification Generator - +