Appease shellcheck

This commit is contained in:
Luke Murphy 2020-09-13 09:31:43 +02:00
parent 76986927eb
commit c7e5e3cc98
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

10
abra
View File

@ -1,7 +1,7 @@
#!/bin/bash
PROGRAM_NAME=""$(basename "$0")
if [ $1 == "-a" ]; then
if [ "$1" == "-a" ]; then
STACK_NAME=$2
shift 2
fi
@ -17,6 +17,7 @@ if type direnv > /dev/null 2>&1 && ! direnv status | grep -q 'Found RC allowed t
fi
if [ -f abra-commands.sh ]; then
# shellcheck disable=SC1091
. abra-commands.sh
fi
@ -68,7 +69,7 @@ sub_run_args(){
exit
fi
docker exec $DOCKER_ARGS -it "$CONTAINER" $@
docker exec "$DOCKER_ARGS" -it "$CONTAINER" "$@"
return
}
@ -108,7 +109,7 @@ sub_logs (){
SERVICE=$1
shift
if [ $# -eq 0 ]; then
LOGS_ARGS="\
--follow \
@ -116,10 +117,11 @@ sub_logs (){
--details \
--timestamps"
else
# shellcheck disable=SC2124
LOGS_ARGS="$@"
fi
docker service logs "${STACK_NAME}_${SERVICE}" $LOGS_ARGS
docker service logs "${STACK_NAME}_${SERVICE}" "$LOGS_ARGS"
}
subcommand=$1