From f302cbed525fddc4596c6d568a176a1528b88058 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 16 Aug 2013 02:18:29 -0400 Subject: Avoid using string interpolation; use printf format strings instead. This involves extending the signature of lib/common.sh's `stat_busy()`, `lock()`, and `slock()`. The `mesg=$1; shift` in stat_busy even suggests that this is what was originally intended from it. --- commitpkg.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'commitpkg.in') diff --git a/commitpkg.in b/commitpkg.in index 707a81c..a5e6d65 100644 --- a/commitpkg.in +++ b/commitpkg.in @@ -135,7 +135,7 @@ for _arch in ${arch[@]}; do fullver=$(get_full_version $_pkgname) if ! pkgfile=$(find_cached_package "$_pkgname" "$fullver" "${_arch}"); then - warning "Skipping $_pkgname-$fullver-$_arch: failed to locate package file" + warning "Skipping %s: failed to locate package file" "$_pkgname-$fullver-$_arch" skip_arches+=($_arch) continue 2 fi @@ -143,7 +143,7 @@ for _arch in ${arch[@]}; do sigfile="${pkgfile}.sig" if [[ ! -f $sigfile ]]; then - msg "Signing package ${pkgfile}..." + msg "Signing package %s..." "${pkgfile}" if [[ -n $GPGKEY ]]; then SIGNWITHKEY="-u ${GPGKEY}" fi @@ -183,7 +183,7 @@ fi if [[ "${arch[*]}" == 'any' ]]; then if [[ -d ../repos/$repo-i686 && -d ../repos/$repo-x86_64 ]]; then pushd ../repos/ >/dev/null - stat_busy "Removing $repo-i686 and $repo-x86_64" + stat_busy "Removing %s and %s" "$repo-i686" "$repo-x86_64" svn rm -q $repo-i686 svn rm -q $repo-x86_64 svn commit -q -m "Removed $repo-i686 and $repo-x86_64 for $pkgname" @@ -193,7 +193,7 @@ if [[ "${arch[*]}" == 'any' ]]; then else if [[ -d ../repos/$repo-any ]]; then pushd ../repos/ >/dev/null - stat_busy "Removing $repo-any" + stat_busy "Removing %s" "$repo-any" svn rm -q $repo-any svn commit -q -m "Removed $repo-any for $pkgname" stat_done -- cgit v1.2.3-70-g09d2