You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
385 B

#!/bin/bash
if [[ -f "$1" ]]; then
[[ `stat -c "%a" "$1"` != 444 ]] && echo "WARNING: $1 permissions invalid"
[[ `stat -c "%a" "$1.sha256"` != 444 ]] && echo "WARNING: $1.sha256 permissions invalid"
if sha256sum -c "$1.sha256" && gpg --verify "$1.sig"; then
echo " -> Okay"
else
echo "ERROR - Validity check failed"
exit 1
fi
else
echo "ERROR - File not found"
exit 1
fi