Skip to content

Commit f99b1d2

Browse files
committed
Merge branch 'jc/maint-template-permbits' into maint
* jc/maint-template-permbits: Fix permission bits on sources checked out with an overtight umask
2 parents 6380d12 + d8bdc49 commit f99b1d2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

templates/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,19 @@ all: boilerplates.made custom
2323

2424
bpsrc = $(filter-out %~,$(wildcard *--*))
2525
boilerplates.made : $(bpsrc)
26-
$(QUIET)ls *--* 2>/dev/null | \
26+
$(QUIET)umask 022 && ls *--* 2>/dev/null | \
2727
while read boilerplate; \
2828
do \
2929
case "$$boilerplate" in *~) continue ;; esac && \
3030
dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \
3131
dir=`expr "$$dst" : '\(.*\)/'` && \
32-
$(INSTALL) -d -m 755 blt/$$dir && \
32+
mkdir -p blt/$$dir && \
3333
case "$$boilerplate" in \
34-
*--) ;; \
35-
*) cp -p $$boilerplate blt/$$dst ;; \
36-
esac || exit; \
34+
*--) continue;; \
35+
esac && \
36+
cp $$boilerplate blt/$$dst && \
37+
if test -x "blt/$$dst"; then rx=rx; else rx=r; fi && \
38+
chmod a+$$rx "blt/$$dst" || exit; \
3739
done && \
3840
date >$@
3941

0 commit comments

Comments
 (0)