From 5fa1331e0949f4cbdc6cbe0a6946e3fd185979b7 Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Sun, 16 Aug 2009 14:14:34 +0200 Subject: Avoid confusing messages and potential problems when no packages are present If no packages are present in the repository, a message like this will be generated, and the corresponding mv command will be issued. Prevent this by checking if *$arch$PKGEXT equals "*$arch$PKGEXT": Scan complete for core (i686) at /srv/ftp/core/os/i686 The following files are in the repo but not the db They will be moved to '/srv/package-cleanup' *i686.pkg.tar.gz --- misc-scripts/ftpdir-cleanup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc-scripts/ftpdir-cleanup b/misc-scripts/ftpdir-cleanup index 622d7ed..9331a4e 100755 --- a/misc-scripts/ftpdir-cleanup +++ b/misc-scripts/ftpdir-cleanup @@ -83,6 +83,9 @@ for arch in ${ARCHES[@]}; do cd "$ftppath" for pkg in *$arch$PKGEXT; do + if [ "$pkg" = "*$arch$PKGEXT" ]; then + continue + fi pkgname="$(getpkgname $pkg)" for p in ${TMPDIR}/${pkgname}-*; do if [ -d "${p}" -a "$(getpkgname $(basename ${p}))" = "${pkgname}" ]; then -- cgit v1.2.3-24-g4f1b