diff --git a/gravity-sync.sh b/gravity-sync.sh index baddedd..dded614 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -361,9 +361,8 @@ function exit_nochange { ## Changes Made function exit_withchange { - SCRIPT_END='date +%s' - SCRIPT_RUNTIME=$((SCRIPT_END-SCRIPT_START)) - echo -e "${INFO} ${PROGRAM} ${TASKTYPE} Completed in ${SCRIPT_RUNTIME}" + SCRIPT_END=$SECONDS + echo -e "${INFO} ${PROGRAM} ${TASKTYPE} Completed in $((SCRIPT_END-SCRIPT_START)) seconds" exit 0 } @@ -407,7 +406,7 @@ function md5_compare { } # SCRIPT EXECUTION ########################### -SCRIPT_START='date +%s' +SCRIPT_START=$SECONDS MESSAGE="Evaluating Script Arguments" echo -en "${STAT} ${MESSAGE}"