diff --git a/Makefile b/Makefile index c6b2cf62..12c9bee6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ +SHELL=/bin/bash + +pre-install: + @$(SHELL) ./scripts/check-node-canvas.sh + all: - @sh ./scripts/install.sh + @$(SHELL) ./scripts/install.sh clean: rm -rf node_modules/* @@ -15,13 +20,13 @@ config/environments/test.js: config.status--test test: config/environments/test.js @echo "***tests***" - ./run_tests.sh ${RUNTESTFLAGS} \ - test/unit/cartodb/*.js \ - test/unit/cartodb/cache/model/*.js \ - test/integration/*.js \ - test/acceptance/*.js \ - test/acceptance/cache/*.js + @$(SHELL) ./run_tests.sh ${RUNTESTFLAGS} \ + test/unit/cartodb/*.js \ + test/unit/cartodb/cache/model/*.js \ + test/integration/*.js \ + test/acceptance/*.js \ + test/acceptance/cache/*.js check: test -.PHONY: test +.PHONY: pre-install test diff --git a/package.json b/package.json index 1e31f865..68b69f6b 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "semver": "~1.1.4" }, "scripts": { - "preinstall": "sh ./scripts/check-node-canvas.sh", + "preinstall": "make pre-install", "test": "make test" }, "engines": { diff --git a/scripts/check-node-canvas.sh b/scripts/check-node-canvas.sh index b5fa8f30..c2d56b83 100644 --- a/scripts/check-node-canvas.sh +++ b/scripts/check-node-canvas.sh @@ -11,7 +11,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then echo "# #" echo "# node-canvas install error: some packages required by 'cairo' are not found #" echo "# #" - echo "# Use '\033[1mmake all\033[0m', it will take care of common/known issues #" + echo -e "# Use '\033[1mmake all\033[0m', it will take care of common/known issues #" echo "# #" echo "# As an alternative try: #" echo "# Try to 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig' #"