Skip to content

Commit 321e8fe

Browse files
UndeadKernelDZoP
authored andcommitted
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.
1 parent 9bb0415 commit 321e8fe

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
EMACS ?= emacs
22
SHELL = bash
3+
34
CASK ?= $(shell command -v cask)
45
ifeq ($(CASK),)
56
$(error "Install cask (https://github.com/cask/cask)")
@@ -41,11 +42,11 @@ test: zmq compile
4142
.PHONY: clean
4243
clean:
4344
make -C js clean
44-
rm $(ELCFILES)
45+
@rm $(ELCFILES) 2>/dev/null || true
4546

4647
.PHONY: clean-cask
4748
clean-cask:
48-
rm -rf .cask/
49+
@rm -rf .cask/ 2>/dev/null || true
4950

5051
.PHONY: widgets
5152
widgets:

js/Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
SHELL = bash
2+
13
NPM ?= $(shell command -v npm)
24
ifeq ($(NPM),)
35
$(error "Node not installed (https://nodejs.org/en/)")
@@ -14,10 +16,10 @@ endif
1416
all: build
1517

1618
clean:
17-
rm -rf built/
19+
@rm -rf built/ 2>/dev/null || true
1820

1921
really-clean: clean
20-
rm -rf node_modules
22+
@rm -rf node_modules 2>/dev/null || true
2123

2224
build: built/index.built.js
2325

0 commit comments

Comments
 (0)