From 62b5941cf7686912cd1bfbb8f9715ace067539b9 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Wed, 12 Oct 2011 23:04:40 +0200 Subject: [PATCH] Modify soundtest to use ALSA's speaker-test This way we no longer need to distribute grml.ogg! --- debian/control | 2 +- usr_bin/soundtest | 39 ++++----------------------------------- 2 files changed, 5 insertions(+), 36 deletions(-) diff --git a/debian/control b/debian/control index 1fc273a..076277d 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ Bugs: mailto:bugs@grml.org Package: grml-scripts Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, less, dialog, perl, zsh, dash, links | w3m | links2, screen, grml-network, grml-etc-core, libterm-readkey-perl, lockfile-progs, grml-scripts-core -Suggests: ruby, python, grml-x, ipcalc, hwinfo, antiword, grml-etc, grml-rebuildfstab, grml-files, grml-hwinfo, pptp-linux, flite, wmii, mutt, slrn, grml-docs, grml-autoconfig, dirvish, sudo, idesk, xlockmore, python-dbus, notification-daemon, grml-quickconfig, lzop +Suggests: ruby, python, grml-x, ipcalc, hwinfo, antiword, grml-etc, grml-rebuildfstab, grml-files, grml-hwinfo, pptp-linux, flite, wmii, mutt, slrn, grml-docs, grml-autoconfig, dirvish, sudo, idesk, xlockmore, python-dbus, notification-daemon, grml-quickconfig, lzop, alsa-utils Breaks: grml-autoconfig (<< 0.9.19) Description: Scripts for the Grml system for an easier life Some scripts which should make life easier. diff --git a/usr_bin/soundtest b/usr_bin/soundtest index 101daa4..6146df7 100755 --- a/usr_bin/soundtest +++ b/usr_bin/soundtest @@ -6,42 +6,11 @@ # License: This file is licensed under the GPL v2. ################################################################################ -PN=`basename "$0"` - -if [ -z "$PLAYER" ] ; then - [ -x /usr/bin/mplayer ] && PLAYER="mplayer" - [ -x /usr/bin/ogg123 ] && PLAYER="ogg123" -fi - -if ! [ $(which $PLAYER) ] ; then - echo "Sorry, neither mplayer nor ogg123 available and \$PLAYER is not set.">&2 - exit 1 +if ! [ $(which speaker-test) ] ; then + echo "Sorry, speaker-test (from alsa-utils) not available.">&2 + exit 1 fi -if [ -z "$1" ] ; then - FILE="/usr/share/grml/effect.ogg" -else - FILE="$*" -fi - -if ! [ -r "$FILE" ] ; then - echo "Sorry, /usr/share/grml/effect.ogg of package grml-files not available.">&2 - exit 1 -fi - -echo "$PN - trying to play $FILE with $PLAYER - -You do not hear anything? Make sure volume is not turned off. -Adjust mixer settings via aumix or alsamixer. - -Tip: $PN supports some options. -Just provide the file(s) you want to play as argument(s), -adjust player which should be used for playing the files -via environment variable PLAYER. Usage example: - - PLAYER=mplayer $PN /usr/share/grml/effect.ogg /another/file/to/play.mp3 -" - -$PLAYER $FILE && echo "It looks like sound works for you. :-)" || echo "problems with sound? :-(" +exec speaker-test -t wav ## END OF FILE ################################################################# -- 2.1.4