summaryrefslogtreecommitdiffstats
path: root/misc-scripts/ftpdir-cleanup
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-07-21 01:12:31 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-07-21 01:12:31 +0200
commitc912283df84f0583496c27a0935d5946ba4dd7cf (patch)
tree337bcd46444da3e6e1797f55d2a9a085c18cc975 /misc-scripts/ftpdir-cleanup
parent82cfca1d3d3e9f432678d7e687c6ca91731410c1 (diff)
downloaddbscripts-c912283df84f0583496c27a0935d5946ba4dd7cf.tar.gz
dbscripts-c912283df84f0583496c27a0935d5946ba4dd7cf.tar.xz
ftpdir-cleanup: Fix ARCHINDEP parsing
Failed hard on empty 'any' directories Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'misc-scripts/ftpdir-cleanup')
-rwxr-xr-xmisc-scripts/ftpdir-cleanup3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc-scripts/ftpdir-cleanup b/misc-scripts/ftpdir-cleanup
index 2573cf4..ca411cf 100755
--- a/misc-scripts/ftpdir-cleanup
+++ b/misc-scripts/ftpdir-cleanup
@@ -84,7 +84,8 @@ done
if [ -d "$ftppath_base/any" ]; then
cd "$ftppath_base/any"
for pkg in *$PKGEXT; do
- if [ ! -h $ftppath_base/i686/$pkg -a ! -h $ftppath_base/x86_64/$pkg ]; then
+ [ -f "$pkg" ] || continue # in case we get a file named "*.pkg.tar.gz"
+ if [ ! -h "$ftppath_base/i686/$pkg" -a ! -h "$ftppath_base/x86_64/$pkg" ]; then
ARCHINDEPFILES="$ARCHINDEPFILES $pkg"
fi
done