summaryrefslogtreecommitdiff
path: root/db-repo-add
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 20:33:06 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-16 13:51:18 -0400
commit6638878c5eb6d5116580d06cc3042a5e9beacb7e (patch)
tree92476d6e2ec6fada6b6e3bedb1cfcffcc7988065 /db-repo-add
parent7850874b1ef1b18de585be108e3be899d95a3a2a (diff)
Use printf-formatters instead of string interpolation on msg, error, etc.
Diffstat (limited to 'db-repo-add')
-rwxr-xr-xdb-repo-add8
1 files changed, 4 insertions, 4 deletions
diff --git a/db-repo-add b/db-repo-add
index a53884e..09ce865 100755
--- a/db-repo-add
+++ b/db-repo-add
@@ -4,7 +4,7 @@
. "$(dirname "$0")/db-functions"
if [ $# -lt 3 ]; then
- msg "usage: ${0##*/} <repo> <arch> <pkgfile> ..."
+ msg "usage: %s <repo> <arch> <pkgfile> ..." "${0##*/}"
exit 1
fi
@@ -15,7 +15,7 @@ pkgfiles=("${@:3}")
ftppath="$FTP_BASE/$repo/os"
if ! check_repo_permission "$repo"; then
- die "You don't have permission to add packages to ${repo}"
+ die "You don't have permission to add packages to %s" "${repo}"
fi
if [ "$arch" == "any" ]; then
@@ -31,9 +31,9 @@ done
for tarch in "${tarches[@]}"; do
for pkgfile in "${pkgfiles[@]}"; do
if [[ ! -f "${FTP_BASE}/${repo}/os/${arch}/${pkgfile##*/}" ]]; then
- die "Package file ${pkgfile##*/} not found in ${FTP_BASE}/${repo}/os/${arch}/"
+ die "Package file %s not found in %s" "${pkgfile##*/}" "${FTP_BASE}/${repo}/os/${arch}/"
else
- msg "Adding $pkgfile to [$repo]..."
+ msg "Adding %s to [%s]..." "$pkgfile" "$repo"
fi
done
arch_repo_add "${repo}" "${tarch}" "${pkgfiles[@]}"