aboutsummaryrefslogblamecommitdiff
path: root/contrib/hotreload.sh
blob: 98d9bf30bd5849f8b8ccc1493d004848e0c24790 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
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