makepkg: adjust log clean-up for new filenames

The log files now have -build or -package at the end and there
are separate log files for each *_package() function. Alter
clean_up() to deal with this. Also, move glob outside quotes so
this actually works.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2009-03-26 01:29:15 +10:00
parent 4c27a776bd
commit 7370fd595b
1 changed files with 8 additions and 1 deletions

View File

@ -155,7 +155,14 @@ clean_up() {
rm -rf "$pkgdir" "$srcdir"
if [ -n "$pkgname" ]; then
# Can't do this unless the BUILDSCRIPT has been sourced.
rm -f "${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log*"
rm -f "${pkgbase}-${pkgver}-${pkgrel}-${CARCH}-build.log"*
if [ "$PKGFUNC" -eq 1 ]; then
rm -f "${pkgbase}-${pkgver}-${pkgrel}-${CARCH}-package.log"*
elif [ "$SPLITPKG" -eq 1 ]; then
for pkg in ${pkgname[@]}; do
rm -f "${pkg}-${pkgver}-${pkgrel}-${CARCH}-package.log"*
done
fi
fi
fi