[Qa-jenkins-scm] [jenkins.debian.net] 06/06: reproducible: build: refactor: use local variables in print_out_duration() to avoid pollute the global env

Holger Levsen holger at moszumanska.debian.org
Sat Apr 18 15:55:14 UTC 2015


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 419c82e85b33cc36f0b480ccd967b4a1eddb7df9
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Mon Apr 6 16:59:41 2015 +0200

    reproducible: build: refactor: use local variables in print_out_duration() to avoid pollute the global env
---
 bin/reproducible_build.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 071150e..9825614 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -86,9 +86,9 @@ update_db_and_html() {
 }
 
 print_out_duration() {
-	HOUR=$(echo "$DURATION/3600"|bc)
-	MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc)
-	SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc)
+	local HOUR=$(echo "$DURATION/3600"|bc)
+	local MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc)
+	local SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc)
 	echo "$(date) - total duration: ${HOUR}h ${MIN}m ${SEC}s." | tee -a ${RBUILDLOG}
 }
 

-- 
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