summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2009-08-16 14:14:34 +0200
committerThomas Bächler <thomas@archlinux.org>2009-08-16 14:14:34 +0200
commit5fa1331e0949f4cbdc6cbe0a6946e3fd185979b7 (patch)
tree2d01f6ff82c7b392d4f0badd61ffa8290becbfc1
parente2767004a5f8796aee00ad7f44d561c4a959341b (diff)
downloaddbscripts-5fa1331e0949f4cbdc6cbe0a6946e3fd185979b7.tar.gz
dbscripts-5fa1331e0949f4cbdc6cbe0a6946e3fd185979b7.tar.xz
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
-rwxr-xr-xmisc-scripts/ftpdir-cleanup3
1 files changed, 3 insertions, 0 deletions
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