From 46de298b7fd46e554e8ab70c6505ec6e2d980053 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Sat, 19 Sep 2020 12:02:55 +0200 Subject: [PATCH] Appease shellcheck --- abra | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/abra b/abra index 415439a..f4108d1 100755 --- a/abra +++ b/abra @@ -170,9 +170,9 @@ sub_cp() { DEST=$2 SERVICE=$(echo "$SOURCE" | grep -o '^[^:]\+:' || echo "$DEST" | grep -o '^[^:]\+:') - SERVICE=$(echo $SERVICE | tr -d ':') + SERVICE=$(echo "$SERVICE" | tr -d ':') - if [ -z $SERVICE ]; then + if [ -z "$SERVICE" ]; then echo "$(tput setaf 1)ERROR: Can't find SERVICE in either SRC or DEST$(tput sgr0)" echo "" echo "Usage: $PROGRAM_NAME cp SERVICE:SRC_PATH DEST_PATH" @@ -183,7 +183,7 @@ sub_cp() { CONTAINER=$(docker container ls --format "table {{.ID}},{{.Names}}" \ | grep "${STACK_NAME}_${SERVICE}" | cut -d',' -f1) - if [ -z $CONTAINER ]; then + if [ -z "$CONTAINER" ]; then echo "$(tput setaf 1)ERROR: Can't find a ${STACK_NAME}_${SERVICE}$(tput sgr0)" exit fi