@matheusbsbs / matheus-bagliano / commits / 9907721501
Fork 0

templates/Makefile: don't depend on local umask setting

Don't take the local umask setting into account when installing the templates/* files and directories, running 'make install' with umask set to 077 resulted in template/* installed with permissions 700 and 600. The problem was discovered by Florian Zumbiehl, reported through http://bugs.debian.org/467518 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Gerrit Pape committed Feb 28, 2008 at 18:44 UTC 9907721501e19758e64bcce6d3b140316c9307b9
1 file changed +3 -3
templates/Makefile
+3 -3
@@ -29,10 +29,10 @@ boilerplates.made : $(bpsrc)
29 case "$$boilerplate" in *~) continue ;; esac && \
30 dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \
31 dir=`expr "$$dst" : '\(.*\)/'` && \
32 - mkdir -p blt/$$dir && \
32 + $(INSTALL) -d -m 755 blt/$$dir && \
33 case "$$boilerplate" in \
34 *--) ;; \
35 - *) cp $$boilerplate blt/$$dst ;; \
35 + *) cp -p $$boilerplate blt/$$dst ;; \
36 esac || exit; \
37 done && \
38 date >$@
@@ -48,4 +48,4 @@ clean:
48 install: all
49 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_dir_SQ)'
50 (cd blt && $(TAR) cf - .) | \
51 - (cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)
51 + (cd '$(DESTDIR_SQ)$(template_dir_SQ)' && umask 022 && $(TAR) xf -)