Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Add check for gpg tool #822

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions contrib/create-coreos-vdi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ if [ $? -ne 0 ]; then
exit 1
fi

# GPG tools required
which gpg &>/dev/null
if [ $? -ne 0 ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, you'd want to wrap vars with double quotes "$?". It's just that it this case it would always have some return code, but for arbitrary var it might end up being interpolated as if [ -ne 0 ]; then in case of empty var/string, which would lead to syntax error being raised by shell interpreter.

echo "$0: gpg is required to verify GPG signature." >&2
exit 1
fi

if [ -z "${DEST}" ]; then
DEST=$PWD
fi
Expand Down