This commit is contained in:
parent
5a646abb12
commit
46de298b7f
6
abra
6
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
|
||||
|
Reference in New Issue
Block a user