basic simili svelte workflow created
This commit is contained in:
16
scripts/build.sh
Normal file
16
scripts/build.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define the file to watch
|
||||
file_to_watch="./"
|
||||
|
||||
# Watch for modification events on the file continuously, with a minimum interval of 1s
|
||||
last_modified=0
|
||||
while read -r directory events filename; do
|
||||
current_time=$(date +%s) # Get the current time in seconds
|
||||
|
||||
if [ "$current_time" -gt "$last_modified" ]; then
|
||||
last_modified=$current_time
|
||||
echo "$current_time - The file $filename was modified."
|
||||
fi
|
||||
done < <(inotifywait -q --monitor --event modify "$file_to_watch")
|
||||
|
||||
Reference in New Issue
Block a user