redvault-ai/.dist/lwatch.fish

14 lines
294 B
Fish
Raw Permalink Normal View History

#!/usr/bin/env fish
set DIRECTORY_TO_WATCH "./"
set SCRIPT_TO_RUN "leptosfmt ./ && rustywind --write ./"
while true
# Wait for any change in the directory
inotifywait -e modify,create,delete,move $DIRECTORY_TO_WATCH
# Run your script
bash -c "$SCRIPT_TO_RUN"
sleep 5
end