From 24c1bd1dc1799b4124782c9f66267d2c4f974bb7 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 28 Apr 2007 18:37:07 +0200 Subject: [PATCH] xsay: add support for sselp and xclip; output error message --- debian/changelog | 2 ++ usr_bin/xsay | 18 +++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) 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 ################################################################# -- 2.1.4