cortav  cortav-view.sh at [e8ab2a68d8]

File desk/cortav-view.sh artifact 053a3467a6 part of check-in e8ab2a68d8


# 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" $cortav_flags

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"