Address shellcheck errors

This commit is contained in:
Andrew Gaul 2019-04-09 21:01:42 +09:00
parent 0a99470369
commit 0176fc712b
2 changed files with 8 additions and 6 deletions

View File

@ -72,18 +72,18 @@ function retry {
N=$1; shift;
status=0
for i in $(seq $N); do
echo "Trying: $@"
$@
echo "Trying: $*"
"$@"
status=$?
if [ $status == 0 ]; then
break
fi
sleep 1
echo "Retrying: $@"
echo "Retrying: $*"
done
if [ $status != 0 ]; then
echo "timeout waiting for $@"
echo "timeout waiting for $*"
fi
set -o errexit
return $status
@ -187,7 +187,7 @@ function start_s3fs {
-o dbglevel=${DBGLEVEL:=info} \
-o retries=3 \
-f \
${@} | stdbuf -oL -eL sed -u "s/^/s3fs: /" &
"${@}" | stdbuf -oL -eL sed -u "s/^/s3fs: /" &
)
if [ `uname` = "Darwin" ]; then

View File

@ -1,3 +1,5 @@
#!/bin/bash
#### Test utils
set -o errexit
@ -120,7 +122,7 @@ function add_tests {
# Log test name and description
# describe [DESCRIPTION]
function describe {
echo "${FUNCNAME[1]}: "$@""
echo "${FUNCNAME[1]}: \"$*\""
}
# Runs each test in a suite and summarizes results. The list of