xsay: add support for sselp and xclip; output error message 0.9.45
authorMichael Prokop <mika@grml.org>
Sat, 28 Apr 2007 16:37:07 +0000 (18:37 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 28 Apr 2007 16:37:07 +0000 (18:37 +0200)
debian/changelog
usr_bin/xsay

index 1a261b8..7169c7d 100644 (file)
@@ -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 <mika@grml.org>  Sat, 28 Apr 2007 17:32:47 +0200
 
index 11242cb..6adab30 100755 (executable)
@@ -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 #################################################################