zsh-workers
 help / color / mirror / code / Atom feed
77b2ac23d547466818a9e5c35c8383c7d44363a2 blob 597 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
#! /bin/sh

HOOKS="pre-commit post-checkout"

case `pwd` in
*/Util) cd ..;;
esac

if ! [ -d .git/hooks ]
then
	echo "No directory for git hooks" >&2
	exit 1
fi

if metastore -h 2>/dev/null 1>&2
then
	echo "Installing in `pwd`/.git/hooks ..." >&2
	cd .git/hooks
	for hook in $HOOKS
	do
		if [ -e $hook ]
		then
			if cmp -s ../../Util/git-$hook $hook
			then
				echo "$hook is already installed" >&2
			else
				echo "Another $hook already exists" >&2
			fi
		else
			ln -s ../../Util/git-$hook $hook
			chmod +x $hook
		fi
	done
else
	echo "Did not find metastore, skipping hooks" >&2
fi

exit 0
debug log:

solving 77b2ac2 ...
found 77b2ac2 in https://inbox.vuxu.org/zsh-workers/130615124610.ZM12323@torch.brasslantern.com/

applying [1/1] https://inbox.vuxu.org/zsh-workers/130615124610.ZM12323@torch.brasslantern.com/
diff --git a/Util/add-git-hooks b/Util/add-git-hooks
new file mode 100755
index 0000000..77b2ac2

Checking patch Util/add-git-hooks...
Applied patch Util/add-git-hooks cleanly.

index at:
100755 77b2ac23d547466818a9e5c35c8383c7d44363a2	Util/add-git-hooks

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).