diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2021-01-22 20:43:44 -0500 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2022-01-18 17:31:55 +0100 |
commit | 01d17e2609a5673a5e70ef977a68d199b7e66abc (patch) | |
tree | fe4f6386b16f35dfb0fd2d1dec79d3c0ee7720c0 | |
parent | 293676b72d6837aad6ea24256f9ed17993dc2d12 (diff) |
sq - housekeeping create_signature()
-rwxr-xr-x | src/librefetch/librefetch | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 87ad9ef..82886bd 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -395,24 +395,24 @@ modified_srcbuild() { create_signature() { local filename="$1" local gpg_cmd=( gpg --detach-sign --use-agent --no-armor ) + local gpg_signing_msg="Signing libre source-ball..." + local gpg_created_msg="Created signature file:" local gpg_remind_msg="Ensure that your GPG key is referenced in the PKGBUILD 'validpgpkeys' array." - local ret=${EXIT_SUCCESS} + local gpg_failed_msg="Failed to sign the libre source-ball!" + local gpg_sign_msg="If you can not sign it now on this machine, you can take it home, and run librerelease on it." + local ret if [[ -n "${GPGKEY}" ]]; then gpg_cmd=( --local-user "${GPGKEY}" ) fi - msg "Signing libre source-ball..." - ${gpg_cmd[@]} "${filename}" &>/dev/null || ret=${EXIT_FAILURE} + msg "${gpg_signing_msg}" + $(${gpg_cmd[@]} "${filename}" &> /dev/null ; ret=$? ; if (( ! ret )); then - msg2 "Created signature file: %s. - ${gpg_remind_msg}" "${filename}.sig" + msg2 "%s %s." "${gpg_created_msg}" "${filename}.sig" ; plain "${gpg_remind_msg}" ; else - error "Failed to sign the libre source-ball!!! - If you can not sign it now on this machine, - you can take it home, and run librerelease on it. - ${gpg_remind_msg}" + error "${gpg_failed_msg}" ; plain "${gpg_sign_msg}" ; plain "${gpg_remind_msg}" ; fi return ${ret} |