From 46a16384801ae329769a759d07821662d063e9b0 Mon Sep 17 00:00:00 2001 From: David Stanek Date: Thu, 30 Jul 2015 22:52:28 +0000 Subject: [PATCH] Fixes deprecated arithmetic expansion for bashate $[...] is deprecated for $((...)) Change-Id: I432b6af3a04e4bb2196c53be84375a2653ae6a30 --- scripts/scripts-library.sh | 4 ++-- tox.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index 44ec32a90d..8e1d0cc9c2 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -49,7 +49,7 @@ function successerator() { exit_fail fi # Print the time that the method completed. - OP_TOTAL_SECONDS="$[$(date +%s) - $OP_START_TIME]" + OP_TOTAL_SECONDS="$(( $(date +%s) - $OP_START_TIME ))" REPORT_OUTPUT="${OP_TOTAL_SECONDS} seconds" REPORT_DATA+="- Operation: [ $@ ]\t${REPORT_OUTPUT}\tNumber of Attempts [ ${RETRY} ]\n" echo -e "Run Time = ${REPORT_OUTPUT}" @@ -173,7 +173,7 @@ function loopback_create() { function exit_state() { set +x - TOTALSECONDS="$[$(date +%s) - $STARTTIME]" + TOTALSECONDS="$(( $(date +%s) - $STARTTIME ))" info_block "Run Time = ${TOTALSECONDS} seconds || $(($TOTALSECONDS / 60)) minutes" if [ "${1}" == 0 ];then info_block "Status: Success" diff --git a/tox.ini b/tox.ini index d60e4251d9..b6a0a8da04 100644 --- a/tox.ini +++ b/tox.ini @@ -28,4 +28,4 @@ commands = bash -c "find {toxinidir} \ -not -path '*/\.*' \ # stay out of the dot directories -name '*sh' \ # all shell scripts please - -print0 | xargs -0 bashate -v -i E003,E010,E011,E020,E041" + -print0 | xargs -0 bashate -v -i E003,E010,E011,E020"