aw-lights/entr.sh
2021-08-21 14:02:08 -04:00

22 lines
352 B
Bash
Executable File

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