#!/bin/tcsh

### Assumes a premade corpus of PCM data, pointed to by $1.
### Scans every file there, including any in subdirectories.
### Alerter is just cat; doesn't nice itself; doesn't log anywhere else.

### Any extra args are passed to scan-and-notify-on-eas, which will pass
### them to pcm-eas-raw when it calls it, which will thus pass them to
### eas-notify.

if ("$1" == "") then
  echo "Must specify corpus."
  exit 1
endif

set corpus = "$1"; shift

foreach x (`find $corpus -type f -print`)
  scan-and-notify-on-eas $x cat pcm-eas-raw $*
end
