20 lines
362 B
Bash
Executable File
20 lines
362 B
Bash
Executable File
#!/bin/bash
|
|
|
|
MINIMODEM="${MINIMODEM-./minimodem}"
|
|
|
|
[ $# -eq 2 ] || {
|
|
echo "usage: self-test baudmode textfile" 1>&2
|
|
exit 1
|
|
}
|
|
baudmode="$1"
|
|
textfile="$2"
|
|
|
|
TMPF="/tmp/minimodem-test-$$.wav"
|
|
trap "rm -f $TMPF" 0
|
|
|
|
set -e
|
|
$MINIMODEM --tx -T 1 --file $TMPF "$baudmode" < "$textfile"
|
|
# ls -l $TMPF
|
|
$MINIMODEM --rx --file $TMPF "$baudmode" | diff "$textfile" -
|
|
|