Reviewed-on: #35 Co-authored-by: Felipe Contreras Salinas <felipe@bstr.cl> Co-committed-by: Felipe Contreras Salinas <felipe@bstr.cl>
11 lines
266 B
Bash
Executable file
11 lines
266 B
Bash
Executable file
#!/bin/bash
|
|
set -eu
|
|
|
|
if GIT_ROOT="$(git rev-parse --show-toplevel)"; then
|
|
ln -s $GIT_ROOT/hooks/pre-commit.sh $GIT_ROOT/.git/hooks/pre-commit
|
|
ln -s $GIT_ROOT/hooks/pre-push.sh $GIT_ROOT/.git/hooks/pre-push
|
|
else
|
|
echo "Failed to get git root, aborting"
|
|
exit 1
|
|
fi
|
|
|