#! /bin/bash -e

. usage.sh

if [[ $@ = "-help" ]] || [[ $@ = "-h" ]]; then
    usage faust2feh "<file.dsp>"
    echo "Compiles Faust programs to SVG and opens them with feh"
    exit
fi

faust2svg $@ || exit
feh --conversion-timeout 0 ${1%.dsp}-svg/process.svg&
