]> git.zerfleddert.de Git - micropolis/blobdiff - res/sounds/player
prevent forking a huge number of player processes by limiting them to
[micropolis] / res / sounds / player
index d85309ca28903d2b2f7cfab9d968bd00071d868c..48e05d7e07f61330f5c454638ff8bcc20ed42295 100755 (executable)
@@ -2,14 +2,14 @@
 
 PLAYER=
 
 
 PLAYER=
 
-if [ -x "`which aplay`" ]; then
+if type -a aplay &>/dev/null; then
        PLAYER=aplay
        PLAYER=aplay
-elif [ -x "`which afplay`" ]; then
+elif type -a afplay &>/dev/null; then
        #afplay is shipped with OS X Leopard
        PLAYER=afplay
        #afplay is shipped with OS X Leopard
        PLAYER=afplay
-elif [ -x "`which play`" ]; then
+elif type -a play &>/dev/null; then
        PLAYER=play
        PLAYER=play
-elif [ -x "`which mplayer`" ]; then
+elif type -a mplayer &>/dev/null; then
        PLAYER="mplayer -nogui -nocache"
 fi
 
        PLAYER="mplayer -nogui -nocache"
 fi
 
Impressum, Datenschutz