summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-06 16:59:41 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 17:20:09 +0200
commit419c82e85b33cc36f0b480ccd967b4a1eddb7df9 (patch)
tree9718060cc282ff8e40e1458135545cb969db590b
parent67f28163aef45c18448ce8c319fe8d395d55b373 (diff)
downloadjenkins.debian.net-419c82e85b33cc36f0b480ccd967b4a1eddb7df9.tar.xz
reproducible: build: refactor: use local variables in print_out_duration() to avoid pollute the global env
-rwxr-xr-xbin/reproducible_build.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 071150eb..9825614e 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}
}