[arch-projects] [dbscripts] [PATCH v2 8/8] ftpdir-cleanup, sourceballs: swap out [ -ge 1 ] for (( > 0 ))
Luke Shumaker
lukeshu at lukeshu.com
Sun Feb 18 17:17:36 UTC 2018
From: Luke Shumaker <lukeshu at parabola.nu>
This is based on a patch by Eli Schwartz <eschwartz at archlinux.org>
---
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
More information about the arch-projects
mailing list