summaryrefslogtreecommitdiff
path: root/src/librefetch/librefetch
diff options
context:
space:
mode:
Diffstat (limited to 'src/librefetch/librefetch')
-rwxr-xr-xsrc/librefetch/librefetch14
1 files changed, 7 insertions, 7 deletions
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}
}