From 386c2d00249eb244bbcc9a173a64f9435b70180a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 18 Jun 2014 13:45:10 -0400 Subject: Use printf formatters instead of string interpolation. I used this command to find them: egrep -r --exclude-dir={test,.git} '(plain|msg|msg2|warning|error|stat_busy|stat_done|abort|die)\s+"?[^"]*\$' --- db-repo-add | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'db-repo-add') diff --git a/db-repo-add b/db-repo-add index 92be22e..4611bdf 100755 --- a/db-repo-add +++ b/db-repo-add @@ -4,7 +4,7 @@ . "$(dirname "$(readlink -e "$0")")/db-functions" if [ $# -lt 3 ]; then - msg "usage: ${0##*/} ..." + msg "usage: %s ..." "${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[@]}" -- cgit v1.2.3