From: Luke Shumaker <[email protected]>
This is based on a patch by Eli Schwartz <[email protected]>
---
cron-jobs/ftpdir-cleanup | 2 +-
cron-jobs/sourceballs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 6a6c82f..fac05bd 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -88,7 +88,7 @@ for f in "${CLEANUP_DESTDIR}"/**/*${PKGEXT_glob}; do
old_pkgs+=("${f##*/}")
fi
done
-if [ ${#old_pkgs[@]} -ge 1 ]; then
+if (( ${#old_pkgs[@]} > 0 )); then
msg "Removing old packages from the cleanup directory..."
for old_pkg in ${old_pkgs[@]}; do
msg2 "${old_pkg}"
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index c47d5ad..d8c0a43 100755
--- a/cron-jobs/sourceballs
+++ b/cron-jobs/sourceballs
@@ -144,7 +144,7 @@ for f in "${SOURCE_CLEANUP_DESTDIR}"/*${SRCEXT}; do
old_pkgs+=("${f##*/}")
fi
done
-if [ ${#old_pkgs[@]} -ge 1 ]; then
+if (( ${#old_pkgs[@]} > 0 )); then
msg "Removing old source packages from the cleanup directory..."
for old_pkg in ${old_pkgs[@]}; do
msg2 "${old_pkg}"
--
2.16.1