12 lines
236 B
Bash
12 lines
236 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
HOOKS_DIR="../.git/hooks"
|
||
|
PRE_PUSH_HOOK="$HOOKS_DIR/pre-push"
|
||
|
|
||
|
# Create symlink
|
||
|
ln -sf "$(dirname "$0")/format_code.sh" "$PRE_PUSH_HOOK"
|
||
|
|
||
|
# Set permissions
|
||
|
chmod +x "$PRE_PUSH_HOOK"
|
||
|
|
||
|
echo "Git hooks installed successfully!"
|