aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-06-17 15:39:11 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-06-17 15:39:36 +0530
commite0943aced8105e229a08322ce5b44472c042deee (patch)
treee5fe9c042610aa0e23351330f8d4fb98665cb74e
parent3a33da381d8d42e0bbc70d5f0e79e4d086c759f2 (diff)
(misc): update watch.sh
-rw-r--r--msg.c1
-rwxr-xr-xwatch.sh8
2 files changed, 7 insertions, 2 deletions
diff --git a/msg.c b/msg.c
index 0360444..a5a86ea 100644
--- a/msg.c
+++ b/msg.c
@@ -313,5 +313,6 @@ main(int argc, char **argv)
free(base_pre);
free(base_post);
+
return EXIT_SUCCESS;
}
diff --git a/watch.sh b/watch.sh
index 85f23c8..24d5427 100755
--- a/watch.sh
+++ b/watch.sh
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
-inotifywait -q -m -r -e modify $1 | while read DIRECTORY EVENT FILE; do
- rm -rf dist && ./msg
+./msg
+
+inotifywait -q -m -r -e modify $(cat config.h | grep DIRECTORY | cut -d '"' -f 2) | while read; do
+ rm -rf dist
+ ./msg
+ echo $?
done