X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=templates%2FMakefile;h=bda9d13505f9dbec8a7864d14c52bbb4827b4f52;hb=dfb9a34ababeee98a9f241636c1fe6e98c754f7a;hp=b8352e731bf4baffbda780a1420f52ca4670b828;hpb=070739fd351702ea9bb4f65595728ae25a488075;p=git.git diff --git a/templates/Makefile b/templates/Makefile index b8352e731..bda9d1350 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -6,8 +6,9 @@ endif INSTALL ?= install TAR ?= tar +RM ?= rm -f prefix ?= $(HOME) -template_dir ?= $(prefix)/share/git-core/templates/ +template_dir ?= $(prefix)/share/git-core/templates # DESTDIR= # Shell quote (do not use $(call) to accommodate ancient setups); @@ -28,10 +29,10 @@ boilerplates.made : $(bpsrc) case "$$boilerplate" in *~) continue ;; esac && \ dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \ dir=`expr "$$dst" : '\(.*\)/'` && \ - mkdir -p blt/$$dir && \ + $(INSTALL) -d -m 755 blt/$$dir && \ case "$$boilerplate" in \ *--) ;; \ - *) cp $$boilerplate blt/$$dst ;; \ + *) cp -p $$boilerplate blt/$$dst ;; \ esac || exit; \ done && \ date >$@ @@ -42,9 +43,9 @@ custom: $(QUIET): no custom templates yet clean: - rm -rf blt boilerplates.made + $(RM) -r blt boilerplates.made install: all - $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_dir_SQ)' (cd blt && $(TAR) cf - .) | \ - (cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -) + (cd '$(DESTDIR_SQ)$(template_dir_SQ)' && umask 022 && $(TAR) xf -)