diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/Makefile | 43 | ||||
-rw-r--r-- | templates/branches-- | 1 | ||||
-rw-r--r-- | templates/info--exclude | 6 | ||||
-rw-r--r-- | templates/this--description | 1 |
4 files changed, 39 insertions, 12 deletions
diff --git a/templates/Makefile b/templates/Makefile index 12433519e..6b2a90071 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -1,19 +1,38 @@ -# make +# make and install sample templates INSTALL=install prefix=$(HOME) -etcdir=$(prefix)/etc -etcgitdir=$(etcdir)/git-core -templatedir=$(etcgitdir)/templates +template_dir=$(prefix)/share/git-core/templates/ # dest= -all: +all: boilerplates custom + find blt + +# Put templates that can be copied straight from the source +# in a file direc--tory--file in the source. They will be +# just copied to the destination. +boilerplates: + 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" : '\(.*\)/'` && \ + mkdir -p blt/$$dir && \ + case "$$boilerplate" in \ + *--) ;; \ + *) cp $$boilerplate blt/$$dst ;; \ + esac || exit; \ + done || exit + +# If you need build-tailored templates, build them into blt/ +# directory yourself here. +custom: + : no custom templates yet + clean: + rm -rf blt -install: - $(INSTALL) -d -m755 $(dest)$(templatedir)/hooks/ - $(foreach s,$(wildcard hooks--*),\ - $(INSTALL) -m644 $s \ - $(dest)$(templatedir)/hooks/$(patsubst hooks--%,%,$s);) - $(INSTALL) -d -m755 $(dest)$(templatedir)/info - $(INSTALL) -d -m755 $(dest)$(templatedir)/branches +install: all + $(INSTALL) -d -m755 $(dest)$(template_dir) + tar Ccf blt - . | tar Cxf $(dest)$(template_dir) - diff --git a/templates/branches-- b/templates/branches-- new file mode 100644 index 000000000..fae88709a --- /dev/null +++ b/templates/branches-- @@ -0,0 +1 @@ +: this is just to ensure the directory exists. diff --git a/templates/info--exclude b/templates/info--exclude new file mode 100644 index 000000000..2c87b72df --- /dev/null +++ b/templates/info--exclude @@ -0,0 +1,6 @@ +# git-ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/templates/this--description b/templates/this--description new file mode 100644 index 000000000..c6f25e80b --- /dev/null +++ b/templates/this--description @@ -0,0 +1 @@ +Unnamed repository; edit this file to name it for gitweb. |