Only removing old packages if they exist.

This commit is contained in:
Daniel Baumann 2007-09-23 13:59:18 +02:00
parent 471b32c682
commit 9f59f16c7c
1 changed files with 7 additions and 4 deletions

View File

@ -84,10 +84,13 @@ do
mkdir -p "${SERVER}"
# Removing old packages
if [ -f "${SERVER}"/"${PACKAGE}"*.changes ]
then
for FILE in `awk {'print $5'} "${SERVER}"/"${PACKAGE}"*.changes | grep -e ".*\.deb$" -e ".*\.diff.gz$" -e ".*\.dsc$" -e ".*\.tar.gz$" -e ".*\.udeb$"`
do
rm -f "${SERVER}"/"${FILE}"
done
fi
rm -f "${SERVER}"/"${PACKAGE}"*.changes