eworm.routeros-scripts/contrib/checksums.sh
2025-03-27 10:27:54 +01:00

9 lines
259 B
Bash
Executable file

#!/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'