contrib: add hotreload script

This commit is contained in:
Simon Ser 2020-02-11 17:37:58 +01:00
parent 82304a78d6
commit 3c391fa81d
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

13
contrib/hotreload.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
# Watch themes and plugins files, automatically reload koushin on change.
events=modify,create,delete,move
targets="themes/ plugins/"
inotifywait -e "$events" -m -r $targets | while read line; do
jobs
if [ -z "$(jobs -p)" ]; then
(sleep 0.5 && pkill -USR1 koushin) &
fi
done