-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpc
More file actions
executable file
·29 lines (24 loc) · 694 Bytes
/
pc
File metadata and controls
executable file
·29 lines (24 loc) · 694 Bytes
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/bash -ue
# Blow away and reinstall all pre-commit hooks.
usage() {
(
echo "usage: ${0##*/} [options]"
echo "Blow away and reinstall all pre-commit hooks."
echo
echo "options:"
(
echo " -h, --help@ show usage help"
) | column -ts@
) 1>&2
exit 1
}
if echo "$*" | grep -Eq -- '--help\b|-h\b'; then
usage
fi
# shellcheck source=../.shell_control
# shellcheck disable=SC1091
source "$HOME/.shell_control" || echo "$(tput bold)error: ~/.shell_control not installed!$(tput sgr0)" >&2
run "rm -rf ~/.cache/pre-commit"
run "pre-commit install --install-hooks"
run "pre-commit autoupdate"
run "pre-commit run -a"