Add some basic documentation
[mirror/dsa-puppet.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..d3f0af6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+SHELL = /bin/bash
+
+.PHONY: all
+all: git_hooks
+       $(info make git_hooks:   set up Git repository hooks)
+
+puppet_parseonly = puppet parser validate
+
+.PHONY: git_hooks
+git_hooks:
+       @if ! git config --get remote.origin.push '^HEAD$$' >/dev/null; then \
+               git config --add remote.origin.push HEAD; \
+       fi
+       @if git config --get remote.origin.push '^refs/notes/audit:refs/notes/audit$$' >/dev/null; then \
+               git config --unset remote.origin.push refs/notes/audit:refs/notes/audit; \
+       fi
+       @if git config --get branch.master.rebase true >/dev/null; then \
+               git config branch.master.rebase true; \
+       fi
+       @ln -sf ../../tools/git_hooks/pre-commit .git/hooks/pre-commit
+       @$(RM) .git/hooks/post-commit
+
+vim_helpers:
+       rsync -a tools/vim ~/.vim/