aboutsummaryrefslogtreecommitdiff
path: root/share/templater/git
diff options
context:
space:
mode:
Diffstat (limited to 'share/templater/git')
-rw-r--r--share/templater/git/files/Makefile.git8
-rwxr-xr-xshare/templater/git/setup2
2 files changed, 10 insertions, 0 deletions
diff --git a/share/templater/git/files/Makefile.git b/share/templater/git/files/Makefile.git
new file mode 100644
index 0000000..026176b
--- /dev/null
+++ b/share/templater/git/files/Makefile.git
@@ -0,0 +1,8 @@
+#
+# Makefile for Git-related tasks - https://templater.fluxo.info
+#
+
+# Configure a git post-receive hook
+post_receive:
+ git config receive.denyCurrentBranch ignore
+ test -s bin/post-receive && cd .git/hooks && ln -sf ../../bin/post-receive
diff --git a/share/templater/git/setup b/share/templater/git/setup
index 952e6ef..a9b26a0 100755
--- a/share/templater/git/setup
+++ b/share/templater/git/setup
@@ -18,6 +18,8 @@ function templater_git {
templater_user_input GIT_USER User "-> Choose a git user name"
templater_user_input GIT_EMAIL user@example.org "-> Choose a git email address"
+ templater_install_makefile $SHARE/git/files/Makefile.git
+
git init
git config user.name "$GIT_USER"
git config user.email "$GIT_EMAIL"