#!/bin/sh

set -eu

SCRIPTDIR=$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)
shfmt --find "${1:-${SCRIPTDIR}}" \
  | grep -v '/other/' \
  | xargs shfmt --list --indent '2' --case-indent --binary-next-line --space-redirects --write
