eworm.routeros-scripts/contrib/checksums.sh

10 lines
259 B
Bash
Raw Normal View History

2025-03-26 09:19:02 +01:00
#!/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'