#!/bin/bash #install_hulu.sh if [ -e /tmp/huludesktop_i386.deb ] then cd /tmp deb2targz huludesktop_i386.deb tar -xzvf huludesktop_i386.tar.gz -C / else echo "Cannot find huludesktop_i386.deb." echo "Please download it from http://www.hulu.com/labs/hulu-desktop-linux" echo "Then copy (or move) it to /tmp" exit fi if grep -q Hulu /usr/share/mythtv/themes/defaultmenu/is.xml then echo "Hulu Desktop exist in Online Streams!" else mv /usr/share/mythtv/themes/defaultmenu/is.xml /tmp grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp echo "" >> /tmp/is.xml.tmp echo " " >> /tmp/is.xml.tmp echo "" >> /tmp/is.xml.tmp echo "" >> /tmp/is.xml.tmp echo "" >> /tmp/is.xml.tmp mv /tmp/is.xml.tmp /usr/share/mythtv/themes/defaultmenu/is.xml echo "Hulu Desktop has been added to Online Streams!" fi if [ -e /home/mythtv/.huludesktop ] then echo "Found existing Hulu configuration file." else cat >> /home/mythtv/.huludesktop << EOF [display] fullscreen = TRUE width = 1024 height = 576 pos_x = 201 pos_y = 179 [remote] lirc_device = /dev/lircd lirc_remote_identifier = mceusb lirc_release_suffix = _UP lirc_repeat_threshold = 10 button_name_up = Up button_name_down = Down button_name_left = Left button_name_right = Right button_name_select = OK button_name_menu = Home [flash] flash_location = /usr/lib/mozilla/plugins/libflashplayer.so [screensaver] suspend_script = /usr/bin/xscreensaver-command -deactivate resume_script = /usr/bin/xscreensaver-command -activate [version] latest = (null) eula_version = 0 EOF chown mythtv.mythtv /home/mythtv/.huludesktop fi echo "Integration of Hulu Desktop is now complete!" echo "Thanks for using LinHES!"