[arch-projects] [dbscripts] [PATCH 2/3] ftpdir-cleanup, sourceballs: replace external find command with bash globbing

Luke Shumaker lukeshu at lukeshu.com
Sat Feb 17 19:29:54 UTC 2018


On Thu, 15 Feb 2018 22:45:03 -0500,
Eli Schwartz via arch-projects wrote:
> diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
> index 2f3d5aa..2d33047 100755
> --- a/cron-jobs/ftpdir-cleanup
> +++ b/cron-jobs/ftpdir-cleanup
...
> -if [ ${#old_pkgs[@]} -ge 1 ]; then
> +if (( ${#old_pkgs[@]} > 1 )); then

That should either be >= 1 or > 0.

> diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
> index 9ab4e98..5844817 100755
> --- a/cron-jobs/sourceballs
> +++ b/cron-jobs/sourceballs
...
> -if [ ${#old_pkgs[@]} -ge 1 ]; then
> +if (( ${#old_pkgs[@]} > 1 )); then

Likewise.

-- 
Happy hacking,
~ Luke Shumaker


More information about the arch-projects mailing list