-
Notifications
You must be signed in to change notification settings - Fork 20
/
step-078.sh
29 lines (24 loc) · 882 Bytes
/
step-078.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
#!/bin/sh
# Test:
# Cli tool: enable/disable auto updates
if ! sh /var/lib/githooks/install.sh; then
echo "! Failed to execute the install script"
exit 1
fi
git config --global --unset githooks.autoupdate.enabled &&
git hooks update enable &&
[ "$(git config --get githooks.autoupdate.enabled)" = "true" ] ||
exit 1
git config --global --unset githooks.autoupdate.enabled &&
git hooks update disable &&
[ "$(git config --get githooks.autoupdate.enabled)" = "false" ] ||
exit 1
# Check the Git alias
git config --global --unset githooks.autoupdate.enabled &&
git hooks update enable &&
[ "$(git config --get githooks.autoupdate.enabled)" = "true" ] ||
exit 1
git config --global --unset githooks.autoupdate.enabled &&
git hooks update disable &&
[ "$(git config --get githooks.autoupdate.enabled)" = "false" ] ||
exit 1