diff options
author | Thomas Bächler <thomas@archlinux.org> | 2008-05-29 21:29:56 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-05-29 21:29:56 +0200 |
commit | c417aa306de4329322d99f1067f97a35013610b3 (patch) | |
tree | a83d19289b33eae1d5b3ed02e037b8439c474a56 /cron-jobs | |
parent | 1c9a21bdf378ddd3572b3b8f405d99b3063521c9 (diff) | |
download | dbscripts-c417aa306de4329322d99f1067f97a35013610b3.tar.gz dbscripts-c417aa306de4329322d99f1067f97a35013610b3.tar.xz |
Fix EXTRAFILES in ftpdir-cleanup
Signed-off-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'cron-jobs')
-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" |