#!/usr/bin/env bash

tmpfile="$(mktemp)"

cargo build --release

# From https://stackoverflow.com/a/42621724
script --quiet --return "${tmpfile}" --command '../target/release/ansi2png-rs -h' > ansi2png_help.ansi

../target/release/ansi2png-rs -i ansi2png_help.ansi -o ansi2png_help.png

rm "${tmpfile}"
