From 419c82e85b33cc36f0b480ccd967b4a1eddb7df9 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 6 Apr 2015 16:59:41 +0200 Subject: 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(-) (limited to 'bin') 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} } -- cgit v1.2.3-70-g09d2