ci: add shellcheck workflow, install/uninstall scripts

This commit is contained in:
2026-03-23 06:31:29 +00:00
parent 55b3d81610
commit 592d1db7d4
4 changed files with 76 additions and 21 deletions

18
install.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Install git hooks globally via core.hooksPath.
# Usage: ./install.sh [--template]
# --template Use init.templateDir instead (only affects new repos)
set -euo pipefail
hook_dir="$(cd "$(dirname "$0")" && pwd)"
if [ "${1:-}" = "--template" ]; then
git config --global init.templateDir "$hook_dir"
echo "Installed: init.templateDir set to $hook_dir"
echo "New repos created with git init/clone will copy these hooks."
else
git config --global core.hooksPath "$hook_dir"
echo "Installed: core.hooksPath set to $hook_dir"
echo "All repos will use hooks from $hook_dir."
fi