diff options
author | Junio C Hamano <junkio@cox.net> | 2005-08-06 12:50:14 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-06 13:49:26 -0700 |
commit | d3af621b147bb90a31fdc3b55e07853f45deb658 (patch) | |
tree | 26d8d69dd5288b5f6f9756ba75549618d808627f /templates | |
parent | f5b749560980a30d7472183e3d6360baa5a1f0d5 (diff) | |
download | git-d3af621b147bb90a31fdc3b55e07853f45deb658.tar.gz git-d3af621b147bb90a31fdc3b55e07853f45deb658.tar.xz |
Redo the templates generation and installation.
Per discussion with people interested in binary packaging,
change the default template location from /etc/git-core to
/usr/share/git-core hierarchy. If a user wants to run git
before installing for whatever reason, in addition to adding
$src to the PATH environment variable, git-init-db can be run
with --template=$src/templates/blt/ parameter.
Signed-off-by: Junio C Hamano <junkio@cox.net>
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. |