In scripts/update-public-key.sh
# Seach the file and make sure the first key id found is the expected key id.
FOUND_KEY_ID=$(gpg --with-colons --show-keys $PUBLIC_KEY_FILE | grep "^fpr" | head -n1 | cut -f10 -d":")
if [[ "$FOUND_KEY_ID" != "$PUBLIC_KEY_ID" ]]; then
echo >&2 "Key id: ${FOUND_KEY_ID} from ${PUBLIC_KEY_FILE} did not match expected key id: ${PUBLIC_KEY_ID}"
exit 1
fi
What if PUBLIC_KEY_FILE contains two keys: first one expected, second one unneeded? Possibly needs to count public keys in the file.
In scripts/update-public-key.sh
What if
PUBLIC_KEY_FILEcontains two keys: first one expected, second one unneeded? Possibly needs to count public keys in the file.