[mythtv] [PATCH] change-channel-lirc.sh - allow sending cmds other
than channels
K.R. Foley
kr at cybsft.com
Fri Mar 12 16:57:44 EST 2004
Hi,
If anyone is interested, I modified change-channel-lirc.sh to allow
sending commands other than channel numbers to irsend.
kr
--
K.R. Foley
kr at cybsft.com
www.cybsft.com
-------------- next part --------------
Index: change-channel-lirc.sh
===================================================================
RCS file: /var/lib/mythcvs/mythtv/contrib/change-channel-lirc.sh,v
retrieving revision 1.2
diff -u -r1.2 change-channel-lirc.sh
--- change-channel-lirc.sh 12 Sep 2003 03:27:19 -0000 1.2
+++ change-channel-lirc.sh 12 Mar 2004 21:45:30 -0000
@@ -2,9 +2,16 @@
REMOTE_NAME=gi-motorola-dct2000
-for digit in $(echo $1 | sed -e 's/./& /g'); do
- irsend SEND_ONCE $REMOTE_NAME $digit
- sleep 1
- # If things work OK with sleep 1, try this for faster channel changes:
- # sleep 0.3
-done
+cmd=$1
+echo $cmd | grep -q -e '^[0-9]'
+ret=$?
+if [ $ret -eq 0 ];then
+ for digit in $(echo $1 | sed -e 's/./& /g'); do
+ irsend SEND_ONCE $REMOTE_NAME $digit
+ sleep 1
+ # If things work OK with sleep 1, try this for faster channel changes:
+ #sleep 0.3
+ done
+else
+ irsend SEND_ONCE $REMOTE_NAME $cmd
+fi
More information about the mythtv-dev
mailing list