diff options
Diffstat (limited to 'http/dev-watch.sh')
-rw-r--r-- | http/dev-watch.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/http/dev-watch.sh b/http/dev-watch.sh new file mode 100644 index 0000000..7c4ece8 --- /dev/null +++ b/http/dev-watch.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +HTTPDEST='/var/epgd/www' + +inotifywait -mrq -e modify,moved_to ./src | while read x op f; do\ + if ! [[ "$f" == *"~"* ]]; then + if [[ "$f" == *".less" ]]; then + make style + cp ./www/epgd.css $HTTPDEST/ + elif [[ "$f" == *".js" ]]; then + echo ------------------------------------------------------------------------------------------------------------------- + make core + cp ./epgd.full.js $HTTPDEST/epgd.full.js + cp ./www/epgd.js $HTTPDEST/epgd.js + fi + if [[ "$x" == "./src/lang/" ]]; then + cp ./src/lang/$f $HTTPDEST/lang/ + cp ./src/lang/$f ./www/lang/ + fi + fi +done +exit |