From 7529c2c2c2387a807781c5456e17c214aa1f22bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wypch=C5=82o?= Date: Mon, 31 May 2021 14:36:47 +0200 Subject: [PATCH] fix for osx and vars that contain spaces (#825) --- dc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dc b/dc index bb86f894..e703c4d3 100755 --- a/dc +++ b/dc @@ -1,7 +1,7 @@ #!/bin/bash if [ -f .env ]; then - export $(cat .env | sed 's/#.*//g' | xargs) + OLD_IFS=$IFS; IFS=$'\n'; for x in `grep -v '^#.*' .env`; do export $x; done; IFS=$OLD_IFS fi # include base docker compose file @@ -9,18 +9,18 @@ COMPOSE_FILES="-f docker-compose.yml" for i in $(seq 1 ${#PORTAL_MODULES}); do # accounts module - alias "a" - if [ ${PORTAL_MODULES:i-1:1} == "a" ]; then + if [[ ${PORTAL_MODULES:i-1:1} == "a" ]]; then COMPOSE_FILES+=" -f docker-compose.accounts.yml" fi # jaeger module - alias "j" - if [ ${PORTAL_MODULES:i-1:1} == "j" ]; then + if [[ ${PORTAL_MODULES:i-1:1} == "j" ]]; then COMPOSE_FILES+=" -f docker-compose.jaeger.yml" fi done # override file if exists -if [ -f docker-compose.override.yml ]; then +if [[ -f docker-compose.override.yml ]]; then COMPOSE_FILES+=" -f docker-compose.override.yml" fi