diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2021-01-22 20:43:44 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2021-07-26 19:20:09 -0400 |
commit | 643bb53c8f145f26649fb160af9643ecce197a53 (patch) | |
tree | cd1c4081c7731dd7a33a11ac43df7d515c1bc85a /src/librefetch | |
parent | afd9ab73bf1491a0bd1ae83ed4207723991aa828 (diff) |
sq - housekeeping create_signature()
Diffstat (limited to 'src/librefetch')
-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} |