feat(system): 调整Git规范
This commit is contained in:
11
scripts/install-git-hooks.sh
Normal file
11
scripts/install-git-hooks.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname "$0")" && pwd)"
|
||||
REPO_ROOT="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
git -C "$REPO_ROOT" config core.hooksPath "$REPO_ROOT/githooks"
|
||||
|
||||
printf '%s\n' "Git hooks installed."
|
||||
printf '%s\n' "core.hooksPath=$REPO_ROOT/githooks"
|
||||
Reference in New Issue
Block a user