Skip to content

Commit

Permalink
Fix sed command error in Mac OS
Browse files Browse the repository at this point in the history
Fix issue #CE-23

https://jira.hyperledger.org/browse/CE-23

Change-Id: I5d2ae66f0a6eed4e3a30ee06e5ff302cc9015d66
Signed-off-by: Haitao Yue <hightall@me.com>
  • Loading branch information
hightall committed Mar 31, 2017
1 parent 0de60fa commit 4778966
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4778966

Please sign in to comment.