trying hot reload script with inotifywait

This commit is contained in:
asus
2023-10-25 14:32:56 +02:00
parent d4c6607ce3
commit 86c3309acf
2 changed files with 46 additions and 29 deletions

20
build.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Define the file to watch
file_to_watch="./"
## Watch for modification events on the file continuously
#inotifywait --monitor --event modify "$file_to_watch" | tee /dev/tty
#while read -r directory events filename; do
# echo "The file $filename was modified."
# # Add your desired actions here
#done
#inotifywait --monitor --event modify --format '%w %e %f' "$file_to_watch"
while read -r directory events filename; do
echo "The file $filename was modified."
# Add your desired actions here
done < <(inotifywait --monitor --event modify "$file_to_watch")

View File

@@ -250,7 +250,7 @@
• • •
••••• • • •
• • •• •
• •
• •
• • ••
• • • •
• •• •
@@ -266,7 +266,7 @@
• • •
••••• • • •
• • •• •
• •
• •
• • ••
• • • •
• •• •
@@ -283,7 +283,7 @@
••••• • • •
• • •• •
• •
• ••
• ••
• • • •
• •• •
••• ••••
@@ -298,7 +298,7 @@
• • •
••••• • • •
• • •• •
• •
• •
• • ••
• • • •
• •• •
@@ -314,8 +314,8 @@
• • •
••••• • • •
• • •• •
• •
• • ••
• •
• ••
• • • •
• •• •
••• ••••
@@ -330,8 +330,8 @@
• • •
••••• • • •
• • •• •
• •
• • ••
• •
• ••
• • • •
• •• •
••• ••••
@@ -346,30 +346,27 @@
• • •
••••• • • •
• • •• •
• •
• ••
• •
• ••
• • • •
• •• •
••• ••••
</pre>
<pre class="mouse f8">
••
• •
••••••••
• • ••
• •
••••• • •
•• •
• •
• • ••
• •
• •• •
••• ••••
••
••
• •
• •
••••• • ••
•••••••••
• •
•• •• •
• • • •
••• •••
</pre>
<pre class="mouse f9">
••
• • •
•• •
@@ -377,8 +374,8 @@
• • • •
••••• • ••
• • •••••••••
• • •
• • ••• •
• • •
• • ••• •
• • • •
• •• • •
••• ••••
@@ -392,8 +389,8 @@
• • • •
••••• • ••
• • •••••••••
• • •
• ••• •
• • •
• • ••• •
• • • •
• •• • •
••• ••••