# arg 1: the new package version
post_install() {
mv /usr/share/mythtv/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/is.xml
mv /usr/share/mythtv/media_settings.xml /tmp
grep -v -e /mythmenu /tmp/media_settings.xml > /tmp/ms.xml.tmp
echo "" >> /tmp/ms.xml.tmp
echo " " >> /tmp/ms.xml.tmp
echo "" >> /tmp/ms.xml.tmp
echo "" >> /tmp/ms.xml.tmp
echo "" >> /tmp/ms.xml.tmp
mv /tmp/ms.xml.tmp /usr/share/mythtv/media_settings.xml
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
/bin/true
}
# arg 1: the old package version
post_remove() {
mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
sed -e '/\#MythVodka/,/\#MythVodka/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
mv /usr/share/mythtv/media_settings.xml /tmp/ms.xml.tmp
sed -e '/\#MythVodka/,/\#MythVodka/d' < /tmp/ms.xml.tmp > /usr/share/mythtv/media_settings.xml
}
op=$1
shift
$op $*