From e7c5dc01cf3bf382c82dd6984808bd3ca21d33a5 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Thu, 5 May 2022 23:15:41 +0200 Subject: Initial commit --- watch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 watch (limited to 'watch') diff --git a/watch b/watch new file mode 100755 index 0000000..9f5acdb --- /dev/null +++ b/watch @@ -0,0 +1,16 @@ +#!/bin/sh + +sigint_handler() +{ + kill $PID + exit +} + +trap sigint_handler SIGINT + +while true; do + cargo run & + PID=$! + inotifywait -e modify -e move -e create -e delete -e attrib -r src/ templates/ assets/ + kill $PID +done -- cgit v1.2.3