From 6638878c5eb6d5116580d06cc3042a5e9beacb7e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 18 Jun 2014 20:33:06 -0400 Subject: Use printf-formatters instead of string interpolation on msg, error, etc. --- db-move | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'db-move') diff --git a/db-move b/db-move index 4828e75..cd67953 100755 --- a/db-move +++ b/db-move @@ -4,7 +4,7 @@ . "$(dirname "$0")/db-functions" if [ $# -lt 3 ]; then - msg "usage: ${0##*/} ..." + msg "usage: %s ..." "${0##*/}" exit 1 fi @@ -15,7 +15,7 @@ ftppath_from="${FTP_BASE}/${repo_from}/os/" ftppath_to="${FTP_BASE}/${repo_to}/os/" if ! check_repo_permission "$repo_to" || ! check_repo_permission "$repo_from"; then - die "You don't have permission to move packages from ${repo_from} to ${repo_to}" + die "You don't have permission to move packages from %s to %s" "${repo_from}" "${repo_to}" fi # TODO: this might lock too much (architectures) @@ -55,10 +55,10 @@ for pkgbase in "${args[@]:2}"; do continue 2 fi done - die "${pkgbase} not found in ${repo_from}" + die "%s not found in %s" "${pkgbase}" "${repo_from}" done -msg "Moving packages from [${repo_from}] to [${repo_to}]..." +msg "Moving packages from [%s] to [%s]..." "${repo_from}" "${repo_to}" declare -A add_pkgs declare -A remove_pkgs @@ -74,7 +74,7 @@ for pkgbase in "${args[@]:2}"; do else tarches=("${pkgarch}") fi - msg2 "${pkgbase} (${tarches[*]})" + msg2 "%s (%s)" "${pkgbase}" "${tarches[*]}" pkgnames=($(. "${svnrepo_from}/PKGBUILD"; echo "${pkgname[@]}")) pkgver=$(. "${svnrepo_from}/PKGBUILD"; get_full_version "${epoch:-0}" "${pkgver}" "${pkgrel}") -- cgit v1.2.3-54-g00ecf