From: Michael Prokop Date: Sat, 28 Apr 2007 16:37:07 +0000 (+0200) Subject: xsay: add support for sselp and xclip; output error message X-Git-Tag: 0.9.45 X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=commitdiff_plain;h=24c1bd1dc1799b4124782c9f66267d2c4f974bb7;hp=211befef6763c7cc998989345022348861c3bbf0 xsay: add support for sselp and xclip; output error message --- diff --git a/debian/changelog b/debian/changelog index 1a261b8..7169c7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ grml-scripts (0.9.45) unstable; urgency=low improvements in status messages. * grml-setlang: fix small typo, it's package locales and not locale of course. Thanks for notifying, David Vilar Benet! + * xsay: add support for sselp and xclip; output error message + if not a single binary for reading X selection can be found. -- Michael Prokop Sat, 28 Apr 2007 17:32:47 +0200 diff --git a/usr_bin/xsay b/usr_bin/xsay index 11242cb..6adab30 100755 --- a/usr_bin/xsay +++ b/usr_bin/xsay @@ -7,14 +7,18 @@ # Latest change: Fre Jul 14 01:29:42 CEST 2006 [mika] ################################################################################ -if [ -x /usr/bin/wmiipsel ] ; then - flite -o play -t "$(wmiipsel)" +if [ -x /usr/bin/sselp ] ; then # package dwm-tools + flite -o play -t "$(sselp)" +elif [ -x /usr/bin/xclip ] ; then # package xclip + flite -o play -t "$(xclip -o)" +elif [ -x /usr/bin/wmiipsel ] ; then # old wmii package + flite -o play -t "$(wmiipsel)" +elif [ -x /usr/bin/wmiiplumb ] ; then # old wmii package + flite -o play -t "$(wmiiplumb)" +elif [ -x /usr/bin/wmiplumb ] ; then # deprecated wmi package + flite -o play -t "$(wmiplumb)" else - if [ -x /usr/bin/wmiiplumb ] ; then - flite -o play -t "$(wmiiplumb)" - else - flite -o play -t "$(wmiplumb)" - fi + echo "error, no program for reading X selection found" | flite fi ## END OF FILE #################################################################