]>
Commit | Line | Data |
---|---|---|
d3af621b | 1 | # make and install sample templates |
8d5afef0 JH |
2 | |
3 | INSTALL=install | |
4 | prefix=$(HOME) | |
d3af621b | 5 | template_dir=$(prefix)/share/git-core/templates/ |
a682ef9f | 6 | # DESTDIR= |
8d5afef0 | 7 | |
d3af621b JH |
8 | all: boilerplates custom |
9 | find blt | |
10 | ||
11 | # Put templates that can be copied straight from the source | |
12 | # in a file direc--tory--file in the source. They will be | |
13 | # just copied to the destination. | |
14 | boilerplates: | |
15 | ls *--* 2>/dev/null | \ | |
16 | while read boilerplate; \ | |
17 | do \ | |
18 | case "$$boilerplate" in *~) continue ;; esac && \ | |
19 | dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \ | |
20 | dir=`expr "$$dst" : '\(.*\)/'` && \ | |
21 | mkdir -p blt/$$dir && \ | |
22 | case "$$boilerplate" in \ | |
23 | *--) ;; \ | |
24 | *) cp $$boilerplate blt/$$dst ;; \ | |
25 | esac || exit; \ | |
26 | done || exit | |
27 | ||
28 | # If you need build-tailored templates, build them into blt/ | |
29 | # directory yourself here. | |
30 | custom: | |
31 | : no custom templates yet | |
32 | ||
8d5afef0 | 33 | clean: |
d3af621b | 34 | rm -rf blt |
8d5afef0 | 35 | |
d3af621b | 36 | install: all |
a682ef9f PB |
37 | $(INSTALL) -d -m755 $(DESTDIR)$(template_dir) |
38 | tar Ccf blt - . | tar Cxf $(DESTDIR)$(template_dir) - |