diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2014-06-18 20:33:06 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2018-03-21 12:34:25 -0400 |
commit | 8cc8e9cbbefdf6fac368031d3dacc74d001f23b7 (patch) | |
tree | 8e7729aafe2bc6d7163d42365f46a97b5d240194 | |
parent | 0432cffc42040f852b9a55c27316248da9064b67 (diff) |
Clean up printf-formatters for user messages
- db-functions: getpkgfile: The .sig file extension should be part of
the filename parameter, not part of the message format string.
- db-functions: arch_repo_modify: Shouldn't use ${action}
string-interpolation in the message format string. Since the
entire message is a command, and we're using @Q to escape arguments
anyway, go ahead and just construct the entire command as a single
string that way, and feed it to '%s'.
-rw-r--r-- | db-functions | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/db-functions b/db-functions index b4d8e7f..a4a5522 100644 --- a/db-functions +++ b/db-functions @@ -273,7 +273,7 @@ getpkgfile() { error "Package %s not found!" "$1" exit 1 elif [[ ! -f ${1}.sig ]]; then - error "Package signature %s.sig not found!" "$1" + error "Package signature %s not found!" "$1.sig" exit 1 fi @@ -450,8 +450,8 @@ arch_repo_modify() { # package files for repo-add might be relative to repo dir pushd "${dbfile%/*}" >/dev/null - /usr/bin/repo-${action} -q "${dbfile}" ${pkgs[@]} \ - || error "repo-${action} %s %s " "${dbfile@Q}" "${pkgs[*]@Q}" + /usr/bin/repo-${action} -q "${dbfile}" "${pkgs[@]}" \ + || error '%s' "repo-${action} ${dbfile@Q} ${pkgs[*]@Q}" set_repo_permission "${repo}" "${arch}" popd >/dev/null |