From 3d15a312d71ab8f701ac7e0f1dc199ed16a98e3c Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sat, 15 Aug 2020 04:41:57 -0400 Subject: housekeeping --- src/librefetch/librefetch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/librefetch') diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 37f1641..f963361 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -387,19 +387,18 @@ modified_srcbuild() { ################################################################################ -# This function is taken almost verbatim from makepkg create_signature() { - local ret=$EXIT_SUCCESS local filename="$1" + local gpg_cmd=( gpg --detach-sign --use-agent --no-armor ) local gpg_remind_msg="Ensure that your GPG key is referenced in the PKGBUILD 'validpgpkeys' array." - local SIGNWITHKEY=() + local ret=${EXIT_SUCCESS} - if [[ -n $GPGKEY ]]; then - SIGNWITHKEY=(-u "${GPGKEY}") + if [[ -n "${GPGKEY}" ]]; then + gpg_cmd=( --local-user "${GPGKEY}" ) fi msg "Signing libre source-ball..." - gpg --detach-sign --use-agent "${SIGNWITHKEY[@]}" --no-armor "$filename" &>/dev/null || ret=$EXIT_FAILURE + ${gpg_cmd[@]} "${filename}" &>/dev/null || ret=${EXIT_FAILURE} if (( ! ret )); then msg2 "Created signature file: %s. @@ -409,8 +408,9 @@ create_signature() { If you can not sign it now on this machine, you can take it home, and run librerelease on it. ${gpg_remind_msg}" - return $ret fi + + return ${ret} } -- cgit v1.2.2