Thread (2 messages) 2 messages, 2 authors, 2013-09-17

Re: Remove bashism from Makefile

From: NeilBrown <hidden>
Date: 2013-09-17 23:22:07

On Tue, 17 Sep 2013 20:20:40 +0400 Michael Tokarev [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Makefile uses [ x == y ] construct which does not work
with POSIX shell.  Since this is just testing a flag,
replace it with string comparison (=) operator instead.

Signed-off-By: Michael Tokarev <redacted>
diff --git a/Makefile b/Makefile
index e8da3a5..c60cc2c 100644
--- a/Makefile
+++ b/Makefile
@@ -156,7 +156,7 @@ all : check_rundir mdadm mdmon
 man : mdadm.man md.man mdadm.conf.man mdmon.man raid6check.man
 
 check_rundir:
-	@if [ ! -d "$(dir $(RUN_DIR))" -a  "$(CHECK_RUN_DIR)" == 1 ]; then \
+	@if [ ! -d "$(dir $(RUN_DIR))" -a  "$(CHECK_RUN_DIR)" = 1 ]; then \
 		echo "***** Parent of $(RUN_DIR) does not exist.  Maybe set different RUN_DIR="; \
 		echo "*****  e.g. make RUN_DIR=/dev/.mdadm" ; \
 		echo "***** or set CHECK_RUN_DIR=0"; exit 1; \
Applied, thanks.

NeilBrown

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help