From 0beccef4ac405fdefdafba5b9ac6e7962b1610d2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 28 Mar 2017 19:14:54 -0400 Subject: Make slightly more involved changes to make shellcheck happy. - Use `read -r` instead of other forms of read or looping - Use arrays instead of strings with whitespaces. - In one instance, use ${var%%.*} instead of $(echo $var|cut -f. -d1) --- commitpkg.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commitpkg.in') diff --git a/commitpkg.in b/commitpkg.in index 0482170..90210e5 100644 --- a/commitpkg.in +++ b/commitpkg.in @@ -148,9 +148,9 @@ for _arch in "${arch[@]}"; do if [[ ! -f $sigfile ]]; then msg "Signing package %s..." "${pkgfile}" if [[ -n $GPGKEY ]]; then - SIGNWITHKEY="-u ${GPGKEY}" + SIGNWITHKEY=(-u "${GPGKEY}") fi - gpg --detach-sign --use-agent --no-armor ${SIGNWITHKEY} "${pkgfile}" || die + gpg --detach-sign --use-agent --no-armor "${SIGNWITHKEY[@]}" "${pkgfile}" || die fi if ! gpg --verify "$sigfile" >/dev/null 2>&1; then die "Signature %s.sig is incorrect!" "$pkgfile" -- cgit v1.2.3-54-g00ecf