#!/bin/sh --

# download sounds from http://www.voyager-center.de/tng/sounds.php
# they're in German, so if you don't speak it, there's no point

echo "Downloading German samples...  hit Ctrl-C if you don't speak it!"

URL="http://www.voyager-center.de/tng/downloads/sounds/"

TMP=$PWD/tmp
mkdir $TMP 2>/dev/null
#rm $TMP/*.wav

while read L
do
  echo
  echo "$L: "
  curl "$URL$L" -o "$TMP/$L"
done < zips.lst

OLD="$PWD"
cd $TMP
ls *.zip|while read L
do
  yes|unzip $L
  rm $L 2>/dev/null
done
cd "$OLD"

mv $TMP/*.wav .

rmdir $TMP 2>/dev/null

echo "Done."

for i in *.wav
do
  aplay $i
done
