# arg 1:  the new package version
post_install() {
  ln -s $MYTHHOME/appletrailer.xml /usr/share/mythtv/themes/defaultmenu/appletrailer.xml
  /usr/LH/bin/gen_is_xml.py
}
# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  /usr/LH/bin/gen_is_xml.py
  if [ -e /usr/share/mythtv/themes/defaultmenu/appletrailer.xml ]
  then
  	exit
  else	
      ln -s /$MYTHHOME/appletrailer.xml /usr/share/mythtv/themes/defaultmenu/appletrailer.xml
  fi
}

# arg 1:  the old package version
post_remove() {
    rm -fr /usr/share/mythtv/appletrailer.xml /usr/share/mythtv/themes/defaulmenu/mythappletrailer.xml
    /usr/LH/bin/gen_is_xml.py
}

#This bit of code is used to check for MYTHHOME and set it
. /usr/MythVantage/bin/install_functions.sh
home_check

op=$1
shift
$op $*