qubes-core-agent-thunar.postinst 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # postinst script for core-agent-linux
  3. #
  4. # see: dh_installdeb(1)
  5. set -e
  6. # The postinst script may be called in the following ways:
  7. # * <postinst> 'configure' <most-recently-configured-version>
  8. # * <old-postinst> 'abort-upgrade' <new version>
  9. # * <conflictor's-postinst> 'abort-remove' 'in-favour' <package>
  10. # <new-version>
  11. # * <postinst> 'abort-remove'
  12. # * <deconfigured's-postinst> 'abort-deconfigure' 'in-favour'
  13. # <failed-install-package> <version> 'removing'
  14. # <conflicting-package> <version>
  15. #
  16. # For details, see http://www.debian.org/doc/debian-policy/ or
  17. # https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html or
  18. # the debian-policy package
  19. case "${1}" in
  20. configure)
  21. # There is no system-wide Thunar custom actions. There is only a default
  22. # file and a user file created from the default one. Qubes actions need
  23. # to be placed after all already defined actions and before </actions>
  24. # the end of file.
  25. if [ -f /etc/xdg/Thunar/uca.xml ] ; then
  26. cp -p /etc/xdg/Thunar/uca.xml{,.bak}
  27. sed -i '$e cat /usr/lib/qubes/uca_qubes.xml' /etc/xdg/Thunar/uca.xml
  28. fi
  29. if [ -f /home/user/.config/Thunar/uca.xml ] ; then
  30. cp -p /home/user/.config/Thunar/uca.xml{,.bak}
  31. sed -i '$e cat /usr/lib/qubes/uca_qubes.xml' /home/user/.config/Thunar/uca.xml
  32. fi
  33. ;;
  34. abort-upgrade|abort-remove|abort-deconfigure)
  35. exit 0
  36. ;;
  37. *)
  38. echo "postinst called with unknown argument \`${1}'" >&2
  39. exit 1
  40. ;;
  41. esac
  42. # dh_installdeb will replace this with shell code automatically
  43. # generated by other debhelper scripts.
  44. #DEBHELPER#
  45. exit 0
  46. # vim: set ts=4 sw=4 sts=4 et :