diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-06 16:59:41 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-04-18 17:20:09 +0200 |
commit | 419c82e85b33cc36f0b480ccd967b4a1eddb7df9 (patch) | |
tree | 9718060cc282ff8e40e1458135545cb969db590b | |
parent | 67f28163aef45c18448ce8c319fe8d395d55b373 (diff) | |
download | jenkins.debian.net-419c82e85b33cc36f0b480ccd967b4a1eddb7df9.tar.xz |
reproducible: build: refactor: use local variables in print_out_duration() to avoid pollute the global env
-rwxr-xr-x | bin/reproducible_build.sh | 6 |
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} } |