From 2b4377c74739c68ced7fe12fe631fa0226a9fad4 Mon Sep 17 00:00:00 2001
From: Michael Gernoth <michael@gernoth.net>
Date: Mon, 14 Jan 2008 23:51:57 +0100
Subject: [PATCH] use bash builtin to detect player

---
 res/sounds/player | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/res/sounds/player b/res/sounds/player
index d85309c..48e05d7 100755
--- a/res/sounds/player
+++ b/res/sounds/player
@@ -2,14 +2,14 @@
 
 PLAYER=
 
-if [ -x "`which aplay`" ]; then
+if type -a aplay &>/dev/null; then
 	PLAYER=aplay
-elif [ -x "`which afplay`" ]; then
+elif type -a afplay &>/dev/null; then
 	#afplay is shipped with OS X Leopard
 	PLAYER=afplay
-elif [ -x "`which play`" ]; then
+elif type -a play &>/dev/null; then
 	PLAYER=play
-elif [ -x "`which mplayer`" ]; then
+elif type -a mplayer &>/dev/null; then
 	PLAYER="mplayer -nogui -nocache"
 fi
 
-- 
2.39.5