diff options
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-x | cron-jobs/ftpdir-cleanup | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup index d6dce11..f8c1a8e 100755 --- a/cron-jobs/ftpdir-cleanup +++ b/cron-jobs/ftpdir-cleanup @@ -70,10 +70,12 @@ done cd "$ftppath" for pkg in *$PKGEXT; do pkgname="$(getpkgname $pkg)" - if [ "$pkg" != "$TMPDIR/$pkgname-*" -a "$(getpkgname $(basename $pkg))" = "$pkgname" ]; then - continue 2 - fi - EXTRAFILES="$EXTRAFILE $pkg" + for p in ${TMPDIR}/${pkgname}-*; do + if [ -d "${p}" -a "$(getpkgname $(basename ${p}))" = "${pkgname}" ]; then + continue 2 + fi + done + EXTRAFILES="$EXTRAFILES $pkg" done cd "$ftppath" |