Added flake with dev deps and git hooks

This commit is contained in:
2025-09-30 23:50:11 -06:00
parent 51abefb9b4
commit f202c5b3eb
7 changed files with 202 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
HOOKS_DIR=".githooks"
GIT_HOOKS_DIR=".git/hooks"
echo "Installing git hooks..."
# Create .git/hooks directory if it doesn't exist
mkdir -p "$GIT_HOOKS_DIR"
# Symlink all hooks from .githooks to .git/hooks
for hook in "$HOOKS_DIR"/*; do
hook_name=$(basename "$hook")
target="$GIT_HOOKS_DIR/$hook_name"
# Remove existing hook or symlink
[ -e "$target" ] && rm "$target"
# Create symlink
ln -s "../../$HOOKS_DIR/$hook_name" "$target"
chmod +x "$hook"
echo "✅ Installed $hook_name"
done
echo "Git hooks installed successfully!"