diff --git a/Makefile b/Makefile index cbe933f..0ea8056 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,7 @@ ssh: git: ln -s $(PWD)/sub/git/gitconfig ~/.gitconfig ln -s $(PWD)/sub/git/gitignore ~/.gitignore + ln -s $(PWD)/sub/git/hooks ~/.githooks ranger: echo "sudo pacman -S highlight ttf-joypixels noto-fonts-emoji ueberzug poppler" diff --git a/sub/git/gitconfig b/sub/git/gitconfig index eb92548..ecfcda7 100644 --- a/sub/git/gitconfig +++ b/sub/git/gitconfig @@ -2,6 +2,7 @@ excludesfile = ~/.gitignore editor = nvim fileMode = false + hooksPath = /home/kan/.githooks [init] defaultBranch = master diff --git a/sub/git/hooks/pre-commit b/sub/git/hooks/pre-commit new file mode 100755 index 0000000..abb470d --- /dev/null +++ b/sub/git/hooks/pre-commit @@ -0,0 +1,7 @@ +#!/bin/sh +if [ -e PKGBUILD ] +then + makepkg --printsrcinfo > .SRCINFO + git add .SRCINFO + exit +fi