mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-28 16:06:12 +01:00
15 lines
337 B
Bash
Executable file
15 lines
337 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "${0}")"
|
|
|
|
rm ./*.cvd hashes.json || :
|
|
|
|
freshclam --datadir=. --config-file=freshclam.conf
|
|
(for i in ./*.cvd;
|
|
do echo '{}' |
|
|
jq --arg path "$(basename "${i}")" \
|
|
--arg sha256sum "$(sha256sum "${i}" | awk '{ print $1; }')" \
|
|
'.[$path] = $sha256sum'; done) |
|
|
jq -s add > hashes.json
|