-
Notifications
You must be signed in to change notification settings - Fork 20
/
step-084.sh
37 lines (34 loc) · 1.1 KB
/
step-084.sh
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
#!/bin/sh
# Test:
# Cli tool: shared hook repository management failures
if ! sh /var/lib/githooks/install.sh; then
echo "! Failed to execute the install script"
exit 1
fi
git hooks shared unknown && exit 2
rm -rf ~/.githooks/shared &&
git hooks shared purge && exit 3
git hooks shared add && exit 4
git hooks shared remove && exit 5
git hooks shared add --shared /tmp/some/repo.git && exit 6
git hooks shared remove --shared /tmp/some/repo.git && exit 7
git hooks shared clear && exit 8
git hooks shared clear unknown && exit 9
git hooks shared list unknown && exit 10
if git hooks shared list --shared; then
exit 11
fi
# Check the Git alias
git hooks shared unknown && exit 12
rm -rf ~/.githooks/shared &&
git hooks shared purge && exit 13
git hooks shared add && exit 14
git hooks shared remove && exit 15
git hooks shared add --shared /tmp/some/repo.git && exit 16
git hooks shared remove --shared /tmp/some/repo.git && exit 17
git hooks shared clear && exit 18
git hooks shared clear unknown && exit 19
git hooks shared list unknown && exit 20
if git hooks shared list --shared; then
exit 21
fi