File: install-git-hook.sh

package info (click to toggle)
pnmixer 0.7.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,088 kB
  • sloc: ansic: 3,984; sh: 23; makefile: 6
file content (10 lines) | stat: -rwxr-xr-x 236 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

if [ -f .githooks/pre-commit ] &&
		[ -d .git ] &&
		[ ! -f .git/hooks/pre-commit ]; then
	cp -p .githooks/pre-commit .git/hooks/pre-commit &&
	chmod +x .git/hooks/pre-commit &&
	echo '-- Activated pre-commit hook.' || :
fi