#!/bin/bash # https://unix.stackexchange.com/a/107405 trap killgroup SIGINT killgroup() { echo Stopping... kill 0 } watchexec -w dot -e dot "dot -Tpng -O dot/*.dot" & watchexec -e tex "tectonic main.tex" & wait