[Piuparts-commits] [SCM] piatti.debian.org configuration files branch, master, updated. 148332ef45997ba3aaf38cc2c9a28441083bad49

Andreas Beckmann debian at abeckmann.de
Fri Dec 23 10:24:25 UTC 2011


The following commit has been merged in the master branch:
commit 752e766dca62e01e954de22698ac6c465a3c7deb
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Thu Dec 1 00:20:10 2011 +0100

    only archive *.log
    
    now that we have *.kpr files as well make sure we only look at *.log
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/home/piupartsm/bin/archive_old_logs b/home/piupartsm/bin/archive_old_logs
index e91deb9..b60175b 100755
--- a/home/piupartsm/bin/archive_old_logs
+++ b/home/piupartsm/bin/archive_old_logs
@@ -49,17 +49,17 @@ for SECTION in $SECTIONS ; do
 	cd $MASTER/$SECTION
 	mkdir -p archive/pass archive/bugged archive/fail
 	# loop through all packages logs 
-	for PACKAGE in $(find pass/ fail/ bugged/|cut -d "_" -f1|cut -d"/" -f2|sort -u|sed '1d') ; do 
+	for PACKAGE in $(find pass/ fail/ bugged/ -name '*.log' | cut -d"_" -f1 | cut -d"/" -f2 | sort -u) ; do
 		# all logs except the last one (|sed '$d' deletes the last line)
-		OLDLOGS=$( ls -tr1 --color=none bugged/${PACKAGE}_* fail/${PACKAGE}_* pass/${PACKAGE}_* 2>/dev/null|sed '$d' )
+		OLDLOGS=$( ls -tr1 --color=none bugged/${PACKAGE}_*.log fail/${PACKAGE}_*.log pass/${PACKAGE}_*.log 2>/dev/null|sed '$d' )
 		if [ ! -z "$OLDLOGS" ] ; then
 			for LOG in $OLDLOGS ; do
 				mv -v $LOG archive/$(echo $LOG|cut -d"/" -f1)/
 			done
 			# ptyhon-bts is really the way to go
-			if $(ls fail/${PACKAGE}_* >/dev/null 2>&1) && $(echo $OLDLOGS | grep -q "bugged/" 2>/dev/null) ; then
+			if $(ls fail/${PACKAGE}_*.log >/dev/null 2>&1) && $(echo $OLDLOGS | grep -q "bugged/" 2>/dev/null) ; then
 				echo keeping bugged state:
-				mv -v fail/${PACKAGE}_* bugged/ 2>/dev/null
+				mv -v fail/${PACKAGE}_*.log bugged/ 2>/dev/null
 			fi
 		fi
 	done

-- 
piatti.debian.org configuration files



More information about the Piuparts-commits mailing list