From 11e3da7c0a6e52bfb8b2f5dce42452c835ab4de0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 3 Feb 2020 16:09:22 +0100 Subject: [PATCH] fix formatting to be shellcheck compliant --- wait-for | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wait-for b/wait-for index 7677dc3..c112be6 100755 --- a/wait-for +++ b/wait-for @@ -11,7 +11,7 @@ usage() { exitcode="$1" cat << USAGE >&2 Usage: - $cmdname host:port [-t timeout] [-- command args] + $0 host:port [-t timeout] [-- command args] -q | --quiet Do not output any status messages -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout -- COMMAND ARGS Execute command with args after the test finishes @@ -20,7 +20,7 @@ USAGE } wait_for() { - for i in `seq $TIMEOUT` ; do + for _ in $(seq $TIMEOUT) ; do nc -z "$HOST" "$PORT" > /dev/null 2>&1 result=$? @@ -76,7 +76,7 @@ if ! [ -x "$(command -v nc)" ]; then exit 1 fi -if [ "$HOST" = "" -o "$PORT" = "" ]; then +if [ "$HOST" = "" ] || [ "$PORT" = "" ]; then echoerr "Error: you need to provide a host and port to test." usage 2 fi