#!/bin/bash while true do inotifywait -e modify $1.tex lualatex -shell-escape $1.tex lualatex -shell-escape $1.tex done