aboutsummaryrefslogblamecommitdiff
path: root/contrib/hotreload.sh
blob: afb61ac9d7afa604b43e5545797ad1a11fbb0f19 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

         
                                                                      




                                                             

                                                           
                                                 

          
#!/bin/sh

# Watch themes and plugins files, automatically reload alps on change.

events=modify,create,delete,move
targets="themes/ plugins/"

inotifywait -e "$events" -m -r $targets | while read line; do
	jobs >/dev/null # Reap status of any terminated job
	if [ -z "$(jobs)" ]; then
		(sleep 0.5 && pkill -USR1 alps) &
	fi
done