2022-03-11 16:36:13 +00:00
|
|
|
#!/bin/bash
|
2022-03-11 13:44:02 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
filesToFormat=$(
|
|
|
|
git --no-pager diff --name-status --no-color --cached | \
|
|
|
|
awk '$1 != "D" && $2 ~ /\.hs/ {print $NF}'
|
|
|
|
)
|
|
|
|
|
|
|
|
for path in $filesToFormat
|
|
|
|
do
|
2022-03-14 11:48:30 +00:00
|
|
|
ormolu --ghc-opt -XTypeApplications --mode inplace $path
|
2022-03-11 13:44:02 +00:00
|
|
|
git add $path
|
|
|
|
done;
|