mirror of
https://github.com/ilyakooo0/roboservant.git
synced 2024-11-29 11:07:02 +03:00
13 lines
319 B
Bash
Executable File
13 lines
319 B
Bash
Executable File
#!/bin/env bash
|
|
#
|
|
# Remember to link me to .git/hooks/pre-commit
|
|
|
|
set -euo pipefail
|
|
|
|
files=$((git diff --cached --name-only --diff-filter=ACMR | grep -Ei "\.hs$") || true)
|
|
if [ ! -z "${files}" ]; then
|
|
echo "$files"
|
|
echo "$files" | xargs ormolu --mode inplace
|
|
git add $(echo "$files" | paste -s -d " " -)
|
|
fi
|