#!/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 "$@"