[Buildroot] [PATCH v2] build: fix umask test

Kurt Van Dijck dev.kurt at vandijck-laurijssen.be
Tue May 31 09:59:13 UTC 2016


> > --- a/Makefile
> > +++ b/Makefile
> > @@ -26,7 +26,7 @@
> >  
> >  # Trick for always running with a fixed umask
> >  UMASK = 0022
> > -ifneq ($(shell umask),$(UMASK))
> > +ifneq (00$(shell umask | sed -e "s/^0*//g"),$(UMASK))
> 
> Doesn't this makes the assumption that "umask" will always return a
> value that starts with two zeros ?

No.
the "umask | sed -e ..." strips leading 0's, when present.
"00$(...)" glues 00 in front of the stripped umask, so it is compatible
again.

Kind regards,
Kurt



More information about the buildroot mailing list