From e436894b05b1d346455c234a7b473f2215c52858 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 18 Sep 2009 11:44:56 -0700 Subject: ftpdir-cleanup: Additional getpkgname cleanup Signed-off-by: Aaron Griffin --- misc-scripts/ftpdir-cleanup | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc-scripts/ftpdir-cleanup b/misc-scripts/ftpdir-cleanup index cc01363..f0f89a3 100755 --- a/misc-scripts/ftpdir-cleanup +++ b/misc-scripts/ftpdir-cleanup @@ -75,9 +75,11 @@ for arch in ${ARCHES[@]}; do fi pkgname="$(getpkgname $pkg)" for p in ${TMPDIR}/${pkgname}-*; do - if [ -d "${p}" -a "$(getpkgname $(basename ${p}))" = "${pkgname}" ]; then + [ ! -d "${p}" ] || continue 2 + dbpkgname=$(grep -A1 '^%FILENAME%$' "${p}/desc" | tail -n1) + if [ "${dbpkgname}" = "${pkgname}" ]; then continue 2 - fi + fi done EXTRAFILES="$EXTRAFILES $pkg" done -- cgit v1.2.3-24-g4f1b