summaryrefslogtreecommitdiff
path: root/cron-jobs/ftpdir-cleanup
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 /cron-jobs/ftpdir-cleanup
parent7850874b1ef1b18de585be108e3be899d95a3a2a (diff)
Use printf-formatters instead of string interpolation on msg, error, etc.
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-xcron-jobs/ftpdir-cleanup12
1 files changed, 6 insertions, 6 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index a2820e1..f6487cf 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -44,17 +44,17 @@ for repo in "${PKGREPOS[@]}"; do
missing_pkgs=($(comm -13 "${WORKDIR}/repo-${repo}-${arch}" "${WORKDIR}/db-${repo}-${arch}"))
if [ ${#missing_pkgs[@]} -ge 1 ]; then
- error "Missing packages in [${repo}] (${arch})..."
+ error "Missing packages in [%s] (%s)..." "${repo}" "${arch}"
for missing_pkg in "${missing_pkgs[@]}"; do
- msg2 "${missing_pkg}"
+ msg2 '%s' "${missing_pkg}"
done
fi
old_pkgs=($(comm -23 "${WORKDIR}/repo-${repo}-${arch}" "${WORKDIR}/db-${repo}-${arch}"))
if [ ${#old_pkgs[@]} -ge 1 ]; then
- msg "Removing old packages from [${repo}] (${arch})..."
+ msg "Removing old packages from [%s] (%s)..." "${repo}" "${arch}"
for old_pkg in "${old_pkgs[@]}"; do
- msg2 "${old_pkg}"
+ msg2 '%s' "${old_pkg}"
clean_pkg "${FTP_BASE}/${repo}/os/${arch}/${old_pkg}"
done
fi
@@ -70,7 +70,7 @@ old_pkgs=($(comm -23 "${WORKDIR}/pool" "${WORKDIR}/db"))
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old packages from package pool..."
for old_pkg in "${old_pkgs[@]}"; do
- msg2 "${old_pkg}"
+ msg2 '%s' "${old_pkg}"
clean_pkg "$FTP_BASE/${PKGPOOL}/${old_pkg}"
done
fi
@@ -79,7 +79,7 @@ old_pkgs=($(find "${CLEANUP_DESTDIR}" -type f -name "*${PKGEXT}" -mtime +"${CLEA
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old packages from the cleanup directory..."
for old_pkg in "${old_pkgs[@]}"; do
- msg2 "${old_pkg}"
+ msg2 '%s' "${old_pkg}"
if ! "${CLEANUP_DRYRUN}"; then
rm -f "${CLEANUP_DESTDIR}/${old_pkg}"
rm -f "${CLEANUP_DESTDIR}/${old_pkg}.sig"