Fix sed command error in Mac OS
Fix issue #CE-23
@@ -6,6 +6,12 @@ RESET := $(shell tput -Txterm sgr0)
THEME?=basic
STATIC_FOLDER?=themes\/${THEME}\/static
TEMPLATE_FOLDER?=themes\/${THEME}\/templates
+SYSTEM=$(shell uname)
+ifeq ($(SYSTEM), Darwin)
+ SED = sed -ix
+else
+ SED = sed -i
+endif
.PHONY: \
all \
@@ -40,8 +46,8 @@ redeploy: ##@Service Redeploy single service, Use like "make redeploy service=da
bash scripts/redeploy.sh ${service}
initial-env: ##@Configuration Initial Configuration for dashboard
- sed -i 's/\(STATIC_FOLDER=\).*/\1${STATIC_FOLDER}/' .env
- sed -i 's/\(TEMPLATE_FOLDER=\).*/\1${TEMPLATE_FOLDER}/' .env
+ $(SED) 's/\(STATIC_FOLDER=\).*/\1${STATIC_FOLDER}/' .env
+ $(SED) 's/\(TEMPLATE_FOLDER=\).*/\1${TEMPLATE_FOLDER}/' .env
start: ##@Service Start service
@$(MAKE) initial-env
