15 lines
350 B
Bash
15 lines
350 B
Bash
#!/bin/bash
|
|||
|
|
# Install git hooks for the automaton framework.
|
||
|
|
set -e
|
||
|
|
|
||
|
|
HOOKS_DIR="$(cd "$(dirname "$0")/.." && pwd)/.git/hooks"
|
||
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||
|
|
|
||
|
|
echo "Installing git hooks..."
|
||
|
|
|
||
|
|
cp "$SCRIPT_DIR/pre-commit-hook.sh" "$HOOKS_DIR/pre-commit"
|
||
|
|
chmod +x "$HOOKS_DIR/pre-commit"
|
||
|
|
|
||
|
|
echo "Installed: $HOOKS_DIR/pre-commit"
|
||
|
|
echo "Done."
|