summaryrefslogtreecommitdiff
path: root/build_tmpl_auto.sh
blob: 98065cb711111e5da0baec48397cfc2c99efda45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
DIRECTORY_TO_OBSERVE="tmpl"
BUILD_SCRIPT="build_tmpl.sh"

function block_for_change {
    inotifywait -e modify,move,create,delete $DIRECTORY_TO_OBSERVE
}

function build {
    bash $BUILD_SCRIPT
}

build
while block_for_change; do
  build
done