mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-30 17:06:19 +01:00
9488b6fd43
Fix #136 (stop pulling the files from @griff's poor server), also add a script to update the files. The fun thing about this is that due to sourcing the files from `https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/raw/master/tests/clamav` during the tests, updates to the `hashes.json` and `*.cvd` files will always fail CI. I guess this is a reasonable tradeoff as long as people are aware of it.
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
|