fixed shellcheck SC2034 SC2166
This commit is contained in:
parent
d375629566
commit
f4ce932d8e
|
|
@ -11,7 +11,7 @@ usage() {
|
||||||
exitcode="$1"
|
exitcode="$1"
|
||||||
cat << USAGE >&2
|
cat << USAGE >&2
|
||||||
Usage:
|
Usage:
|
||||||
$cmdname host:port [-t timeout] [-- command args]
|
$0 host:port [-t timeout] [-- command args]
|
||||||
-q | --quiet Do not output any status messages
|
-q | --quiet Do not output any status messages
|
||||||
-t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
|
-t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
|
||||||
-- COMMAND ARGS Execute command with args after the test finishes
|
-- COMMAND ARGS Execute command with args after the test finishes
|
||||||
|
|
@ -20,7 +20,7 @@ USAGE
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_for() {
|
wait_for() {
|
||||||
for i in `seq $TIMEOUT` ; do
|
for _ in $(seq $TIMEOUT) ; do
|
||||||
nc -z "$HOST" "$PORT" > /dev/null 2>&1
|
nc -z "$HOST" "$PORT" > /dev/null 2>&1
|
||||||
|
|
||||||
result=$?
|
result=$?
|
||||||
|
|
@ -71,7 +71,7 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$HOST" = "" -o "$PORT" = "" ]; then
|
if [ "$HOST" = "" ] || [ "$PORT" = "" ]; then
|
||||||
echoerr "Error: you need to provide a host and port to test."
|
echoerr "Error: you need to provide a host and port to test."
|
||||||
usage 2
|
usage 2
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue