diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-18 20:33:06 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-16 13:51:18 -0400 |
commit | 6638878c5eb6d5116580d06cc3042a5e9beacb7e (patch) | |
tree | 92476d6e2ec6fada6b6e3bedb1cfcffcc7988065 /cron-jobs/sourceballs | |
parent | 7850874b1ef1b18de585be108e3be899d95a3a2a (diff) |
Use printf-formatters instead of string interpolation on msg, error, etc.
Diffstat (limited to 'cron-jobs/sourceballs')
-rwxr-xr-x | cron-jobs/sourceballs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index dee849a..0c2f9f9 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -103,15 +103,15 @@ for repo in "${PKGREPOS[@]}"; do done < "${WORKDIR}/db-${repo}" if [ ${#newpkgs[@]} -ge 1 ]; then - msg "Adding source packages for [${repo}]..." + msg "Adding source packages for [%s]..." "${repo}" for new_pkg in "${newpkgs[@]}"; do - msg2 "${new_pkg}" + msg2 '%s' "${new_pkg}" done fi if [ ${#failedpkgs[@]} -ge 1 ]; then - msg "Failed to create source packages for [${repo}]..." + msg "Failed to create source packages for [%s]..." "${repo}" for failed_pkg in "${failedpkgs[@]}"; do - msg2 "${failed_pkg}" + msg2 '%s' "${failed_pkg}" done fi done @@ -125,7 +125,7 @@ if [ ${#old_pkgs[@]} -ge 1 ]; then msg "Removing old source packages..." "${SOURCE_CLEANUP_DRYRUN}" && warning 'dry run mode is active' for old_pkg in "${old_pkgs[@]}"; do - msg2 "${old_pkg}" + msg2 '%s' "${old_pkg}" if ! "${SOURCE_CLEANUP_DRYRUN}"; then mv_acl "$FTP_BASE/${SRCPOOL}/${old_pkg}" "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}" touch "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}" @@ -137,7 +137,7 @@ old_pkgs=($(find "${SOURCE_CLEANUP_DESTDIR}" -type f -name "*${SRCEXT}" -mtime + if [ ${#old_pkgs[@]} -ge 1 ]; then msg "Removing old source packages from the cleanup directory..." for old_pkg in "${old_pkgs[@]}"; do - msg2 "${old_pkg}" + msg2 '%s' "${old_pkg}" "${SOURCE_CLEANUP_DRYRUN}" || rm -f "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}" done fi |