]>
Commit | Line | Data |
---|---|---|
851812f3 | 1 | #!/bin/bash |
e4270049 | 2 | |
851812f3 | 3 | PLAYER= |
e4270049 | 4 | |
2b4377c7 | 5 | if type -a aplay &>/dev/null; then |
e4270049 | 6 | PLAYER=aplay |
2b4377c7 | 7 | elif type -a afplay &>/dev/null; then |
6ae3b055 MG |
8 | #afplay is shipped with OS X Leopard |
9 | PLAYER=afplay | |
2b4377c7 | 10 | elif type -a play &>/dev/null; then |
e4270049 | 11 | PLAYER=play |
2b4377c7 | 12 | elif type -a mplayer &>/dev/null; then |
e4270049 MG |
13 | PLAYER="mplayer -nogui -nocache" |
14 | fi | |
15 | ||
851812f3 MG |
16 | if [ "x${PLAYER}" = "x" ]; then |
17 | echo "Can't find audio player!" | |
18 | echo "Please make sure you have aplay, play or mplayer in your path." | |
19 | if [ "`uname`" = "Darwin" ]; then | |
20 | echo "A working play for OS X is available from:" | |
21 | echo "http://www.hieper.nl/html/play.html" | |
22 | fi | |
23 | else | |
24 | exec ${PLAYER} "$@" >/dev/null 2>&1 | |
25 | fi |