aboutsummaryrefslogtreecommitdiff
path: root/build_tmpl_auto.sh
blob: c10c858c51bbb57f80757f793643df1634027626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
DIRECTORY_TO_OBSERVE="util/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