diff --git a/maat b/maat
index 3df645c..a6f7e97 100755
--- a/maat
+++ b/maat
@@ -61,6 +61,7 @@ function BuildPackage() {
for pkg in `find . -type f | grep -E "${pkgExt}""\$"`; do
printf "$pkg
" >> "$webfile"
pkgname="$(basename "$pkg" | cut -f 1 -d '.' | sed 's/-[[:digit:]]\+$//')"
+ # Remove old copies
find "${pkgdir}/${suffix}/" -name "${pkgname}-[0-9]*" -exec rm {} \;
mv "$pkg" "$pkgdir"/"$suffix";
mv "$pkg"".sig" "$pkgdir"/"$suffix";
@@ -95,11 +96,11 @@ function BuildRepo() {
for pkgbuild in `find . -type f -name PKGBUILD`; do
cd "$(dirname "$pkgbuild")"
# Tell the status file about it.
- printf '