diff options
Diffstat (limited to 'abs/extra/xbmc/xbmc.install')
-rw-r--r-- | abs/extra/xbmc/xbmc.install | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/abs/extra/xbmc/xbmc.install b/abs/extra/xbmc/xbmc.install index a59d22b..6c58697 100644 --- a/abs/extra/xbmc/xbmc.install +++ b/abs/extra/xbmc/xbmc.install @@ -1,4 +1,17 @@ post_install() { + mv /usr/share/mythtv/themes/defaultmenu/library.xml /tmp + grep -v -e /mythmenu /tmp/library.xml > /tmp/library.xml.tmp + echo "<!--#XBMC-->" >> /tmp/library.xml.tmp + echo " <button>" >> /tmp/library.xml.tmp + echo " <type>MENU_XBMC</type>" >> /tmp/library.xml.tmp + echo " <text>Launch XBMC</text>" >> /tmp/library.xml.tmp + echo " <action>EXEC /usr/bin/xbmc</action>" >> /tmp/library.xml.tmp + echo " </button>" >> /tmp/library.xml.tmp + echo "<!--#XBMC-->" >> /tmp/library.xml.tmp + echo "" >> /tmp/library.xml.tmp + echo "</mythmenu>" >> /tmp/library.xml.tmp + mv /tmp/library.xml.tmp /usr/share/mythtv/themes/defaultmenu/library.xml + echo ">> If XBMC won't start, but just segfaults, double check your X.Org config." echo ">> The display depth has to be at least 24-bit, ie" echo ">> set \"DefaultDepth 24\" under the \"Screen\" section of your xorg.conf file." @@ -16,6 +29,22 @@ post_install() { } post_upgrade() { + mv /usr/share/mythtv/themes/defaultmenu/library.xml /tmp/library.xml.tmp + sed -e '/\#XBMC/,/\#XBMC/d' < /tmp/library.xml.tmp > /usr/share/mythtv/themes/defaultmenu/library.xml + + mv /usr/share/mythtv/themes/defaultmenu/library.xml /tmp + grep -v -e /mythmenu /tmp/library.xml > /tmp/library.xml.tmp + echo "<!--#XBMC-->" >> /tmp/library.xml.tmp + echo " <button>" >> /tmp/library.xml.tmp + echo " <type>MENU_XBMC</type>" >> /tmp/library.xml.tmp + echo " <text>Launch XBMC</text>" >> /tmp/library.xml.tmp + echo " <action>EXEC /usr/bin/xbmc</action>" >> /tmp/library.xml.tmp + echo " </button>" >> /tmp/library.xml.tmp + echo "<!--#XBMC-->" >> /tmp/library.xml.tmp + echo "" >> /tmp/library.xml.tmp + echo "</mythmenu>" >> /tmp/library.xml.tmp + mv /tmp/library.xml.tmp /usr/share/mythtv/themes/defaultmenu/library.xml + [[ $(type -p gtk-update-icon-cache) ]] && /usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor [[ $(type -p update-desktop-database) ]] && /usr/bin/update-desktop-database -q usr/share/applications } @@ -23,4 +52,7 @@ post_upgrade() { post_remove() { [[ $(type -p gtk-update-icon-cache) ]] && /usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor [[ $(type -p update-desktop-database) ]] && /usr/bin/update-desktop-database -q usr/share/applications + + mv /usr/share/mythtv/themes/defaultmenu/library.xml /tmp/library.xml.tmp + sed -e '/\#XBMC/,/\#XBMC/d' < /tmp/library.xml.tmp > /usr/share/mythtv/themes/defaultmenu/library.xml } |