#!/bin/bash

if test $# != 1; then
    die "Error: usage: audio-fetch-file-binary WAVFILE";
fi

files=(
    /data/test-audio.wav
    /data/internal-record.wav
    /data/external-record.wav
) 

match=false

for x in ${files[@]}; do
    if test "$(readlink -f "$1")" = $x; then
	match=true
	break
    fi
done

if test $match = false; then
    die "Error: WAVFILE must be one of ${file[@]}"
fi

cat $x
