cortav  Artifact [a29a5961ee]

Artifact a29a5961eeda0aa2313c2c8c9ca5cfdaec387f885b5f80417be568fb9c38e064:


# note that this file lacks a shebang. there is no compatible way
# to write a shebang that works across distros, so we're generating
# the shebang and inserting it into the script at build time.
# we also do something similar with the path to cortav, in case the
# executable isn't in $PATH

out=$(mktemp --suffix=.html)

"$cortav_exec" "$1" -o "$out" -m html:width 35em

if test "$BROWSER" != ""; then
	"$BROWSER" "file://$out"
else
	xdg-open "$out"
fi

# clean up when the browser closes
sleep 1 # in case of tricksiness
rm "$out"