mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-17 08:27:45 +03:00
1863c82559
* chore: moves git hook into own folder This is is done in preparation of having other git hooks * chore: Creates script to run formatter * chore: Checks that ormolu is installed before running it * chore: Adds pre-commit hook to format Haskell files * chore: Ensures the ormolu instruction are outputted when running hook * chore: Prints formatted files on newlines
10 lines
259 B
Bash
Executable File
10 lines
259 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
repo_root=$(git rev-parse --show-toplevel)
|
|
hooks_folder="$repo_root/.git/hooks"
|
|
|
|
ln -sf "$repo_root/scripts/git-hooks/commit-msg.sh" "$hooks_folder/commit-msg"
|
|
ln -sf "$repo_root/scripts/git-hooks/pre-commit.sh" "$hooks_folder/pre-commit"
|
|
|