Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-06 23:50:14 +0400
committerJunio C Hamano <junkio@cox.net>2005-08-07 00:49:26 +0400
commitd3af621b147bb90a31fdc3b55e07853f45deb658 (patch)
tree26d8d69dd5288b5f6f9756ba75549618d808627f /templates/Makefile
parentf5b749560980a30d7472183e3d6360baa5a1f0d5 (diff)
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/Makefile')
-rw-r--r--templates/Makefile43
1 files changed, 31 insertions, 12 deletions
diff --git a/templates/Makefile b/templates/Makefile
index 12433519ee..6b2a90071b 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) -