Fixes deprecated arithmetic expansion for bashate

$[...] is deprecated for $((...))

Change-Id: I432b6af3a04e4bb2196c53be84375a2653ae6a30
This commit is contained in:
David Stanek 2015-07-30 22:52:28 +00:00 committed by Hugh Saunders
parent 928ffa071d
commit 46a1638480
2 changed files with 3 additions and 3 deletions

View File

@ -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"

View File

@ -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"