updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / alevt-dvb / TeletextDVB.sh
blob9f3f58cf98d93696e33382c5125e42d21fa4b5be
1 #!/bin/bash
2 ## Author Heinrich Schwietering (2009)
3 ## Script to start a dvb-t supporting version of AleVT
4 ## Modified and translated by Heiko Baums (2009)
6 MCD=/usr/bin/alevt
8 zenity --help > /dev/null || { echo "Error: You need \"zenity\" to use this script." && exit 1 ; }
9 test -e $MCD || { zenity --error --text "Error: You need \"aleVT\" with dvb support to use this script." && exit 1 ; }
10 test ! -e ~/TeletextPIDS.lst && zenity --error --text "~/TeletextPIDS.lst not found" && exit 1
11 STATION=`cat ~/TeletextPIDS.lst | cut -d ";" -f 1 | zenity --list --title "Please select a station" --column "Station:"` || exit 0
12 test "$STATION" || { zenity --error --text "No station selected." && exit 1 ; }
13 PID=`grep "$STATION" ~/TeletextPIDS.lst | cut -d ";" -f 2`
14 $MCD -vbi /dev/dvb/adapter0/demux0 -pid $PID -parent 100 > /dev/null