diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-09-18 20:44:56 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-09-18 20:44:56 +0200 |
commit | e436894b05b1d346455c234a7b473f2215c52858 (patch) | |
tree | 40e537ad85ea02f4dc011e42d68311f63a59b2c6 | |
parent | aa87efaa0e4f973ab37bd56b9fa690eabde27d92 (diff) | |
download | dbscripts-e436894b05b1d346455c234a7b473f2215c52858.tar.gz dbscripts-e436894b05b1d346455c234a7b473f2215c52858.tar.xz |
ftpdir-cleanup: Additional getpkgname cleanup
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-x | misc-scripts/ftpdir-cleanup | 6 |
1 files 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 |