Skip to content

Commit

Permalink
Merge branch 'jc/maint-template-permbits' into maint
Browse files Browse the repository at this point in the history
* jc/maint-template-permbits:
  Fix permission bits on sources checked out with an overtight umask
  • Loading branch information
Junio C Hamano committed Sep 19, 2008
2 parents 6380d12 + d8bdc49 commit f99b1d2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions templates/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@ all: boilerplates.made custom

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

Expand Down

0 comments on commit f99b1d2

Please sign in to comment.