grafana/scripts/build/verify_signed_packages.sh

25 lines
407 B
Bash
Raw Normal View History

#!/bin/bash
_files=$*
if [ -z "$_files" ]; then
echo "_files (arg 1) has to be set"
exit 1
fi
mkdir -p ~/.rpmdb/pubkeys
curl -s https://packages.grafana.com/gpg.key > ~/.rpmdb/pubkeys/grafana.key
ALL_SIGNED=0
for file in $_files; do
2019-11-19 02:22:51 -06:00
if rpm -K "$file" | grep "digests signatures OK" -q ; then
echo "$file" OK
else
ALL_SIGNED=1
echo "$file" NOT SIGNED
fi
done
exit $ALL_SIGNED