git: Add aur-package template folder
Use `init.templateDir` to use this.
This commit is contained in:
20
.local/share/git/templates/aur-package/hooks/pre-commit
Normal file
20
.local/share/git/templates/aur-package/hooks/pre-commit
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An hook script to verify what is about to be committed.
|
||||
# Called by "git commit" with no arguments. The hook should exit with non-zero
|
||||
# status after issuing an appropriate message if it wants to stop the commit.
|
||||
|
||||
if git rev-parse --verify HEAD >/dev/null 2>&1
|
||||
then
|
||||
against=HEAD
|
||||
else
|
||||
# Initial commit: diff against an empty tree object
|
||||
against=$(git hash-object -t tree /dev/null)
|
||||
fi
|
||||
|
||||
# Redirect output to stderr.
|
||||
exec 1>&2
|
||||
|
||||
# Regenerate .SRCINFO
|
||||
makepkg --printsrcinfo >.SRCINFO
|
||||
git add .SRCINFO
|
||||
Reference in New Issue
Block a user