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