Merge pull request #1006 from gaul/shellcheck

Address shellcheck errors
This commit is contained in:
Takeshi Nakatani 2019-04-09 23:39:11 +09:00 committed by GitHub
commit e5e124b9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

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

View File

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