#!/bin/bash

# NBOTE: This doesn't use finddev - as covered in announcefile

MINBIN=/usr/local/minerva/bin/
MINMEDIA=/usr/local/minerva/media
VARLOG=/var/log/minerva

date +"%F %H:%M CMD $0 $*" >>$VARLOG/bearskin/`basename $0`

DEVICE=$1; shift

MIXDUMP=`mktemp`

$MINBIN/mixer $DEVICE store $MIXDUMP

$MINBIN/mixer $DEVICE dec cd 50
$MINBIN/mixer $DEVICE dec linein 50
$MINBIN/mixer $DEVICE dec microphone 50

$MINBIN/mp3player DEVICE pause

$MINBIN/wavplayer $DEVICE splay $MINMEDIA/wav/chime.wav

$MINBIN/say $DEVICE $*

$MINBIN/mp3player DEVICE resume

$MINBIN/mixer $DEVICE recall $MIXDUMP
rm $MIXDUMP

$MINBIN/monexec announce made $*

