1#!/bin/sh23if ! command -v fourmolu 1>/dev/null; then4 echo "error: fourmolu is not installed" 1>&25 exit 16fi78out=$(git diff --cached --name-only app/ src/ test/ | xargs -r fourmolu -q --mode check 2>&1)9if [ $? -ne 0 ]; then10 printf "The following files need to be formated with 'fourmolu':\n\n" 1>&211 printf "%s\n" "${out}" | awk '/\.hs$/ { printf("\t%s\n", $0) }' 1>&212 exit 113fi