linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Remove bashism from Makefile
@ 2013-09-17 16:20 Michael Tokarev
  2013-09-17 23:22 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Tokarev @ 2013-09-17 16:20 UTC (permalink / raw)
  To: linux-raid; +Cc: NeilBrown, Michael Tokarev

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 <mjt@tls.msk.ru>

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; \

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Remove bashism from Makefile
  2013-09-17 16:20 Remove bashism from Makefile Michael Tokarev
@ 2013-09-17 23:22 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2013-09-17 23:22 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 936 bytes --]

On Tue, 17 Sep 2013 20:20:40 +0400 Michael Tokarev <mjt@tls.msk.ru> wrote:

> 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 <mjt@tls.msk.ru>
> 
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-17 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 16:20 Remove bashism from Makefile Michael Tokarev
2013-09-17 23:22 ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).