fix: use Bash shell and omit rm errors (#13)

Without this change, if the user does not have bash, `command` fails (as
it is a bash built-in). Explicitly set bash to be the shell.

Omit error messages of the `rm` command while cleaning.
This commit is contained in:
UndeadKernel 2019-02-06 20:26:52 +00:00 committed by Nathaniel Nicandro
parent 9bb0415255
commit 321e8fe81f
2 changed files with 7 additions and 4 deletions

View file

@ -1,5 +1,6 @@
EMACS ?= emacs
SHELL = bash
CASK ?= $(shell command -v cask)
ifeq ($(CASK),)
$(error "Install cask (https://github.com/cask/cask)")
@ -41,11 +42,11 @@ test: zmq compile
.PHONY: clean
clean:
make -C js clean
rm $(ELCFILES)
@rm $(ELCFILES) 2>/dev/null || true
.PHONY: clean-cask
clean-cask:
rm -rf .cask/
@rm -rf .cask/ 2>/dev/null || true
.PHONY: widgets
widgets:

View file

@ -1,3 +1,5 @@
SHELL = bash
NPM ?= $(shell command -v npm)
ifeq ($(NPM),)
$(error "Node not installed (https://nodejs.org/en/)")
@ -14,10 +16,10 @@ endif
all: build
clean:
rm -rf built/
@rm -rf built/ 2>/dev/null || true
really-clean: clean
rm -rf node_modules
@rm -rf node_modules 2>/dev/null || true
build: built/index.built.js