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