Build/Helper/watcher.sh

19 lines
332 B
Bash

#!/bin/bash
DIRECTORY_TO_OBSERVE="cssOMS jsOMS"
function watcher {
inotifywait -r -e modify,move,create,delete \
--exclude ".*(\.css|\.php|\.json|\.md|\.sh|\.txt|\.log|\.min\.js)" \
${DIRECTORY_TO_OBSERVE}
}
BUILD_SCRIPT=build_frontend.sh
function build {
bash ${BUILD_SCRIPT}
}
build
while watcher; do
build
done