summaryrefslogtreecommitdiffstats
path: root/cron-jobs
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/ftpdir-cleanup10
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"