#!/bin/sh while true; do go build main.go ./main & PID=$! inotifywait -r -e modify . kill $PID done