qubes-core-agent-thunar.postrm 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/sh
  2. # postrm script for core-agent-linux
  3. #
  4. # see: dh_installdeb(1)
  5. set -e
  6. # The prerm script may be called in the following ways:
  7. # * <postrm> 'remove'
  8. # * <postrm> 'purge'
  9. # * <old-postrm> 'upgrade' <new-version>
  10. # * <disappearer's-postrm> 'disappear' <overwriter> <overwriter-version>
  11. #
  12. # The postrm script is called after the package's files have been removed
  13. # or replaced. The package whose postrm is being called may have previously been
  14. # deconfigured and only be "Unpacked", at which point subsequent package changes
  15. # do not consider its dependencies. Therefore, all postrm actions may only rely
  16. # on essential packages and must gracefully skip any actions that require the
  17. # package's dependencies if those dependencies are unavailable.[48]
  18. #
  19. # * <new-postrm> 'failed-upgrade' <old-version>
  20. #
  21. # Called when the old postrm upgrade action fails. The new package will be
  22. # unpacked, but only essential packages and pre-dependencies can be relied on.
  23. # Pre-dependencies will either be configured or will be "Unpacked" or
  24. # "Half-Configured" but previously had been configured and was never removed.
  25. #
  26. # * <new-postrm> 'abort-install'
  27. # * <new-postrm> 'abort-install' <old-version>
  28. # * <new-postrm> 'abort-upgrade' <old-version>
  29. #
  30. # Called before unpacking the new package as part of the error handling of
  31. # preinst failures. May assume the same state as preinst can assume.
  32. #
  33. # For details, see http://www.debian.org/doc/debian-policy/ or
  34. # https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html or
  35. # the debian-policy package
  36. if [ "${1}" = "remove" ] ; then
  37. if [ -f /etc/xdg/Thunar/uca.xml ] ; then
  38. mv /etc/xdg/Thunar/uca.xml /etc/xdg/Thunar/uca.xml.uninstall
  39. mv /etc/xdg/Thunar/uca.xml.bak /etc/xdg/Thunar/uca.xml
  40. fi
  41. if [ -f /home/user/.config/Thunar/uca.xml ] ; then
  42. mv /home/user/.config/Thunar/uca.xml /home/user/.config/Thunar/uca.xml.uninstall
  43. mv /home/user/.config/Thunar/uca.xml.bak /home/user/.config/Thunar/uca.xml
  44. fi
  45. fi
  46. # dh_installdeb will replace this with shell code automatically
  47. # generated by other debhelper scripts.
  48. #DEBHELPER#
  49. exit 0
  50. # vim: set ts=4 sw=4 sts=4 et :