From bc770dc6f562164a834f4cc46a2925961f976cf4 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Wed, 16 Aug 2017 11:03:04 +0100 Subject: [PATCH] shortened code using timer functions --- install_groovy.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/install_groovy.sh b/install_groovy.sh index e5877307..d30f82cb 100755 --- a/install_groovy.sh +++ b/install_groovy.sh @@ -25,9 +25,7 @@ GROOVY_VERSION=${GROOVY_VERSION:-2.4.7} BASE=/opt -date -start_time="$(date +%s)" -echo +start_time="$(start_timer)" | if ! [ -e "$BASE/groovy" ]; then mkdir -p "$BASE" @@ -51,13 +49,6 @@ export PATH=\$PATH:\$GROOVY_HOME/bin EOF fi -echo -date -echo -end_time="$(date +%s)" -# if start and end time are the same let returns exit code 1 -let time_taken=$end_time-$start_time || : -echo "Completed in $time_taken secs" -echo +time_taken "$start_time" section2 "Groovy Install Completed" echo