repo-add: check for valid key when signing is requested
Follow the example of makepkg Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
59da64146d
commit
fade60088e
1 changed files with 11 additions and 1 deletions
|
@ -554,7 +554,17 @@ while [[ $# > 0 ]]; do
|
||||||
-q|--quiet) QUIET=1;;
|
-q|--quiet) QUIET=1;;
|
||||||
-d|--delta) DELTA=1;;
|
-d|--delta) DELTA=1;;
|
||||||
-f|--files) WITHFILES=1;;
|
-f|--files) WITHFILES=1;;
|
||||||
-s|--sign) SIGN=1;;
|
-s|--sign)
|
||||||
|
SIGN=1
|
||||||
|
if ! gpg --list-key ${GPGKEY} &>/dev/null; then
|
||||||
|
if [[ ! -z $GPGKEY ]]; then
|
||||||
|
error "$(gettext "The key ${GPGKEY} does not exist in your keyring.")"
|
||||||
|
else
|
||||||
|
error "$(gettext "There is no key in your keyring.")"
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
-k|--key)
|
-k|--key)
|
||||||
shift
|
shift
|
||||||
GPGKEY="$1"
|
GPGKEY="$1"
|
||||||
|
|
Loading…
Add table
Reference in a new issue