mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-06-20 17:55:40 +02:00
support creating the checksums file
This commit is contained in:
parent
ce39b79f69
commit
f8c3659f6a
3 changed files with 17 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,5 +9,8 @@
|
|||
# html files (as generated from markdown)
|
||||
*.html
|
||||
|
||||
# checksums file as used by $ScriptInstallUpdate
|
||||
checksums.json
|
||||
|
||||
# Mac OS X folder settings file
|
||||
.DS_Store
|
||||
|
|
7
Makefile
7
Makefile
|
@ -9,7 +9,7 @@ WIFI = $(wildcard *.wifi.rsc)
|
|||
MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md)
|
||||
HTML = $(MARKDOWN:.md=.html)
|
||||
|
||||
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML)
|
||||
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json
|
||||
|
||||
%.html: %.md Makefile
|
||||
markdown $< | sed 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' > $@
|
||||
|
@ -32,5 +32,8 @@ all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML)
|
|||
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
||||
< $< > $@
|
||||
|
||||
checksums.json: contrib/checksums.sh *.rsc */*.rsc
|
||||
contrib/checksums.sh
|
||||
|
||||
clean:
|
||||
rm -f $(HTML)
|
||||
rm -f $(HTML) checksums.json
|
||||
|
|
9
contrib/checksums.sh
Executable file
9
contrib/checksums.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# generate a checksums file as used by $ScriptInstallUpdate
|
||||
|
||||
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'
|
Loading…
Add table
Add a link
Reference in a new issue