diff options
| author | WormHeamer | 2025-10-27 23:41:58 -0400 |
|---|---|---|
| committer | WormHeamer | 2025-10-27 23:41:58 -0400 |
| commit | 70ee897904b708d07f3cd0d823b5dad8536a4654 (patch) | |
| tree | 6c290461f28c0ca88548b5e3b55002dc73f42610 | |
| parent | 0b5cf5d18142e715f7bba89c21eada34d3f77b54 (diff) | |
add watch.sh
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile | 2 | ||||
| -rwxr-xr-x | watch.sh | 14 |
3 files changed, 16 insertions, 1 deletions
@@ -1,2 +1,3 @@ a.out *.o +out.pdf @@ -27,7 +27,7 @@ debug: ${EXE} ${GDB} -ex start --args ./${EXE} ${RUNARGS} clean: - rm -fv ${EXE} ${OBJ} + rm -fv ${EXE} ${OBJ} out.pdf ${EXE}: ${OBJ} ${CC} ${LDFLAGS} ${OBJ} -o ${EXE} ${LDLIBS} diff --git a/watch.sh b/watch.sh new file mode 100755 index 0000000..896473d --- /dev/null +++ b/watch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +gen() { + tcc ir.c lex.c impl.c peephole.c proc.c -run main.c test.lang\ + | dot -Tpdf -o out.pdf +} + +gen +mupdf out.pdf & +while true; do + inotifywait -e modify -r . + gen + killall -SIGHUP mupdf +done |
