autodist-cleanold: skip processing SPECPARTS files in spec folder

This commit is contained in:
Silvan Calarco 2024-09-20 16:50:57 +02:00
parent f54041d4df
commit dc76be906a

View File

@ -20,7 +20,7 @@ function clean() {
if [ -e $dir/RPM/BUILD/ ]; then if [ -e $dir/RPM/BUILD/ ]; then
find $dir/RPM/BUILD/ -mindepth 1 -maxdepth 1 -type d -ctime ${BUILD_CTIME_OLD} -exec rm -rf {} \; find $dir/RPM/BUILD/ -mindepth 1 -maxdepth 1 -type d -ctime ${BUILD_CTIME_OLD} -exec rm -rf {} \;
# delete older package duplicates # delete older package duplicates
find $dir/RPM/BUILD/ -maxdepth 1 | sort -V | \ find $dir/RPM/BUILD/ -maxdepth 1 | grep -V SPECPARTS | sort -V | \
while read curr; do while read curr; do
if [ "${curr/-[0-9._]*}" = "${last/-[0-9._]*}" -a "${last}" ]; then if [ "${curr/-[0-9._]*}" = "${last/-[0-9._]*}" -a "${last}" ]; then
rm -rf $last rm -rf $last