diff options
author | Simon Ser <contact@emersion.fr> | 2020-02-11 17:37:58 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-02-11 17:37:58 +0100 |
commit | 3c391fa81db23666df0fd238267795126338bf43 (patch) | |
tree | 69e8a0deca7adc2f742500cf58a8e7e46ab41ffa /contrib | |
parent | 82304a78d61f14de897fb6dba70f4b17fb396217 (diff) | |
download | alps-3c391fa81db23666df0fd238267795126338bf43.tar.gz alps-3c391fa81db23666df0fd238267795126338bf43.zip |
contrib: add hotreload script
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/hotreload.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/hotreload.sh b/contrib/hotreload.sh new file mode 100755 index 0000000..98d9bf3 --- /dev/null +++ b/contrib/hotreload.sh @@ -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 |