postinst 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/sh
  2. # postinst script for Cryptomator
  3. #
  4. # see: dh_installdeb(1)
  5. set -e
  6. # summary of how this script can be called:
  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. # for details, see http://www.debian.org/doc/debian-policy/ or
  16. # the debian-policy package
  17. case "$1" in
  18. configure)
  19. echo Adding shortcut to the menu
  20. if [ ! -d "/usr/share/desktop-directories" ]; then
  21. mkdir -p /usr/share/desktop-directories
  22. fi
  23. xdg-desktop-menu install --novendor /usr/share/applications/org.cryptomator.Cryptomator.desktop
  24. sed -i s/Exec=cryptomator\\s%F/Exec=LD_LIBRARY_PATH=\\/usr\\/lib\\/x86_64-linux-gnu\ cryptomator\ %F/ /usr/share/applications/org.cryptomator.Cryptomator.desktop
  25. xdg-mime install /usr/share/mime/packages/application-vnd.cryptomator.vault.xml
  26. ;;
  27. abort-upgrade|abort-remove|abort-deconfigure)
  28. ;;
  29. *)
  30. echo "postinst called with unknown argument \`$1'" >&2
  31. exit 1
  32. ;;
  33. esac
  34. # dh_installdeb will replace this with shell code automatically
  35. # generated by other debhelper scripts.
  36. #DEBHELPER#
  37. exit 0