aboutsummaryrefslogtreecommitdiffstats
path: root/on-change
blob: 19d47f0a912359a3732f0558877cc0dc8d341972 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
sleep 5;
r() {
  local V="{}"
  while true; do
    local NV="$(cat build/uwu/version.json build/generated/background.iife.js)"
    if [[ "$V" != "$NV" ]]; then
      echo -ne "\x1b[2K\x1b[1GRequesting reload\x1b[1G" 1>&2;
      echo "$1"
      V="$NV"
    fi
    sleep 0.5;
  done
}
r "$@"