summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/.gitignore1
-rw-r--r--templates/Makefile10
2 files changed, 9 insertions, 2 deletions
diff --git a/templates/.gitignore b/templates/.gitignore
index ca680c5..6759ecb 100644
--- a/templates/.gitignore
+++ b/templates/.gitignore
@@ -1 +1,2 @@
blt
+boilerplates.made
diff --git a/templates/Makefile b/templates/Makefile
index c23aee8..07e928e 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -6,6 +6,12 @@ prefix ?= $(HOME)
template_dir ?= $(prefix)/share/git-core/templates/
# DESTDIR=
+# Shell quote;
+# Result of this needs to be placed inside ''
+shq = $(subst ','\'',$(1))
+# This has surrounding ''
+shellquote = '$(call shq,$(1))'
+
all: boilerplates.made custom
find blt
@@ -38,6 +44,6 @@ clean:
rm -rf blt boilerplates.made
install: all
- $(INSTALL) -d -m755 $(DESTDIR)$(template_dir)
+ $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(template_dir))
(cd blt && $(TAR) cf - .) | \
- (cd $(DESTDIR)$(template_dir) && $(TAR) xf -)
+ (cd $(call shellquote,$(DESTDIR)$(template_dir)) && $(TAR) xf -)