Add a simple script to watch for mapfile changes
parent
7c33d72799
commit
c0acb24491
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
file="$1"
|
||||||
|
str='Current'
|
||||||
|
interval=5
|
||||||
|
ding="/usr/share/bzflag/pop.wav"
|
||||||
|
|
||||||
|
last="$(grep "$str" "$file")"
|
||||||
|
while sleep $interval
|
||||||
|
do
|
||||||
|
cur="$(grep "$str" "$file")"
|
||||||
|
test "$cur" != "$last" && mpv "$ding"
|
||||||
|
last="$cur"
|
||||||
|
done
|
Loading…
Reference in New Issue