X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=templates%2FMakefile;h=a12c6e214e65d39136b1ed41a8ff0ea25e28f91b;hb=1fa24f8f3d950b17ac15979c09b733c8e6f5c00c;hp=cc3fc3094cbbf1e15dff9cd1f3fc80e92d6be06e;hpb=1b118da8bd1878d78589afd9f755b9d52a9579ad;p=git.git diff --git a/templates/Makefile b/templates/Makefile index cc3fc3094..a12c6e214 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -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 >$@