aw-lights/entr.sh
2021-08-08 14:15:38 -04:00

15 lines
267 B
Bash
Executable File

CMD="$(cat <<'EOF'
set -euo pipefail
HEIGHT="$(($(tput lines) - 1))"
clear
for i in check fmt build clippy; do
echo "+ cargo "${i}""
cargo --color=always "${i}" |& head -n "${HEIGHT}"
done
EOF
)"
{
fd -tf -ers
printf "%s\n" "Cargo.toml"
} | entr bash -c "${CMD}"