diff mbox

[v2] build: fix umask test

Message ID 1466309526-31230-1-git-send-email-dev.kurt@vandijck-laurijssen.be
State Accepted
Commit 3f4c72c60793ca6ada24ae85c3211b2ab178eb3b
Headers show

Commit Message

Kurt Van Dijck June 19, 2016, 4:12 a.m. UTC
Some shells' builtin umask does not print 2 leading 0's for the umask.
Switching to bash is done anyway.
This patch switches to bash before the umask test.

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
---
 Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Peter Korsgaard June 20, 2016, 8:51 p.m. UTC | #1
>>>>> "Kurt" == Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> writes:

 > Some shells' builtin umask does not print 2 leading 0's for the umask.
 > Switching to bash is done anyway.
 > This patch switches to bash before the umask test.

 > Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>

Committed, thanks.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 3f5c3d3..78b44c5 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,11 @@ 
 # You shouldn't need to mess with anything beyond this point...
 #--------------------------------------------------------------
 
+# we want bash as shell
+SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+	 else if [ -x /bin/bash ]; then echo /bin/bash; \
+	 else echo sh; fi; fi)
+
 # Trick for always running with a fixed umask
 UMASK = 0022
 ifneq ($(shell umask),$(UMASK))
@@ -227,11 +232,6 @@  else
   Q = @
 endif
 
-# we want bash as shell
-SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
-	 else if [ -x /bin/bash ]; then echo /bin/bash; \
-	 else echo sh; fi; fi)
-
 # kconfig uses CONFIG_SHELL
 CONFIG_SHELL := $(SHELL)