#!/usr/bin/env bash tmpfile="$(mktemp)" cargo build --release # From https://stackoverflow.com/a/42621724 script --quiet --return "${tmpfile}" --command 'msgcat --color=test' > msgcat.ansi ../target/release/ansi2png-rs -i msgcat.ansi -o msgcat.png rm "${tmpfile}"