git hooks for PKGBUILD

This commit is contained in:
TheK4n 2022-10-03 22:57:00 +03:00
parent 1340d9c485
commit b1168ac6fc
3 changed files with 9 additions and 0 deletions

View File

@ -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"

View File

@ -2,6 +2,7 @@
excludesfile = ~/.gitignore
editor = nvim
fileMode = false
hooksPath = /home/kan/.githooks
[init]
defaultBranch = master

7
sub/git/hooks/pre-commit Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
if [ -e PKGBUILD ]
then
makepkg --printsrcinfo > .SRCINFO
git add .SRCINFO
exit
fi