dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 8e150e7afa054afa0f16fdf285fc0d806f43f789
parent 1f4a31918c3f9d78728b525e47dca30a538a2395
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun,  5 Aug 2018 07:29:53 -0400

Add prepare-commit-msg Git hook

Diffstat:
A.local/lib/gitdir/hooks/prepare-commit-msg | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/.local/lib/gitdir/hooks/prepare-commit-msg b/.local/lib/gitdir/hooks/prepare-commit-msg @@ -0,0 +1,17 @@ +#!/bin/sh +# Template commit messages for various repos / repo types + +# Arch Linux PKGBUILD's +if [ -f .SRCINFO -a -f PKGBUILD ] +then + pkgbase=`cat .SRCINFO | grep ^pkgbase | cut -d '=' -f 2 | tr -d ' '` + pkgver=`cat .SRCINFO | grep pkgver | cut -d '=' -f 2 | tr -d ' '` + pkgrel=`cat .SRCINFO | grep pkgrel | cut -d '=' -f 2 | tr -d ' '` + + msg="upgpkg: $pkgbase $pkgver-$pkgrel" + default=`cat $1` + echo $msg > $1 + cat >> $1 <<-EOF +$default +EOF +fi