[Qa-jenkins-scm] [jenkins.debian.net] 01/01: use different xterm background colors for different architectures

Holger Levsen holger at layer-acht.org
Mon Nov 14 10:12:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit e53c8a31037825b6170425c711ce875d96b6e2d3
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Nov 14 11:12:14 2016 +0100

    use different xterm background colors for different architectures
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 deploy_everywhere | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/deploy_everywhere b/deploy_everywhere
index 9c3bee8..597e1af 100755
--- a/deploy_everywhere
+++ b/deploy_everywhere
@@ -125,6 +125,16 @@ else
 	echo -n "Running '$real_command' on $HOSTS now."
 	real_command="$@ && echo '__reallyreally=ok__'"
 fi
+BG=""
+
+get_arch_color() {
+	case $1 in
+		*i386*)		BG=lightblue ;;
+		*amd64*)	BG=lightgreen ;;
+		*armhf*)	BG=lightyellow ;;
+		*)		BG=white ;;
+	esac
+}
 
 LOG=$(mktemp -u)
 for i in $HOSTS ; do
@@ -140,7 +150,8 @@ for i in $HOSTS ; do
 				;;
 		esac
 	fi
-	xterm -class deploy-jenkins -fa 'DejaVuSansMono' -fs 10 -e "ssh -o 'BatchMode = yes' -t $i '$command' | tee $LOG.$i ; sleep 2 ; touch $LOG.$i.done" &
+	get_arch_color $i
+	xterm -class deploy-jenkins -bg $BG -fa 'DejaVuSansMono' -fs 10 -e "ssh -o 'BatchMode = yes' -t $i '$command' | tee $LOG.$i ; sleep 2 ; touch $LOG.$i.done" &
 done
 sleep 3
 COUNTER=0
@@ -173,7 +184,8 @@ for i in $HOSTS ; do
 		rm $LOG.$i $LOG.$i.done > /dev/null
 	else
 		echo "Problems on $i: $TAIL"
-		xterm -class deploy-jenkins -fa 'DejaVuSansMono' -fs 10 -e "less +G $LOG.$i ; rm $LOG.$i $LOG.$i.done" &
+		get_arch_color $i
+		xterm -class deploy-jenkins -bg $BG -fa 'DejaVuSansMono' -fs 10 -e "less +G $LOG.$i ; rm $LOG.$i $LOG.$i.done" &
 	fi
 done
 echo

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list