2005-08-06 21:50:14 +02:00
|
|
|
# make and install sample templates
|
2005-08-03 01:45:21 +02:00
|
|
|
|
|
|
|
INSTALL=install
|
|
|
|
prefix=$(HOME)
|
2005-08-06 21:50:14 +02:00
|
|
|
template_dir=$(prefix)/share/git-core/templates/
|
2005-08-03 01:45:21 +02:00
|
|
|
# dest=
|
|
|
|
|
2005-08-06 21:50:14 +02:00
|
|
|
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
|
|
|
|
|
2005-08-03 01:45:21 +02:00
|
|
|
clean:
|
2005-08-06 21:50:14 +02:00
|
|
|
rm -rf blt
|
2005-08-03 01:45:21 +02:00
|
|
|
|
2005-08-06 21:50:14 +02:00
|
|
|
install: all
|
|
|
|
$(INSTALL) -d -m755 $(dest)$(template_dir)
|
|
|
|
tar Ccf blt - . | tar Cxf $(dest)$(template_dir) -
|