Initial Debian package for PostIt.Desktop (yavsc)
This commit is contained in:
commit
9703ebf4dd
13 changed files with 421 additions and 0 deletions
31
debian/postinst
vendored
Executable file
31
debian/postinst
vendored
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
# postinst — run after the package is unpacked
|
||||
#
|
||||
# Two responsibilities:
|
||||
# 1. Refresh the desktop-file database so the application appears
|
||||
# in the menu (xdg-utils / desktop-file-utils).
|
||||
# 2. Register postit as the default handler for the postit://
|
||||
# URI scheme via xdg-mime. This is what makes
|
||||
# `xdg-open postit://callback?code=***` launch PostIt.
|
||||
|
||||
set -e
|
||||
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
update-desktop-database -q /usr/share/applications || true
|
||||
fi
|
||||
|
||||
# xdg-mime default is per-user; the system-wide default is set
|
||||
# via a MIME-typed association in /usr/share/applications/ which
|
||||
# update-desktop-database picks up. We just need to make sure the
|
||||
# desktop file is registered for the postit:// scheme at the
|
||||
# system level.
|
||||
if [ -x /usr/bin/xdg-mime ]; then
|
||||
# Per-user registration is not appropriate here; the system-wide
|
||||
# registration happens via the MimeType= field in the .desktop
|
||||
# file plus update-desktop-database above. Nothing more to do.
|
||||
:
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue