Skip to content

Commit

Permalink
4083: Check if xdg-desktop-menu pre-requisites are met before runni…
Browse files Browse the repository at this point in the history
…ng it
  • Loading branch information
Morel Bérenger authored Jan 27, 2023
1 parent 9be179a commit ff361e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/resources/linux/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ ! -x "$XDG_DESKTOP_MENU" ]; then
echo "Error: Could not find xdg-desktop-menu" >&2
exit 1
fi
"$XDG_DESKTOP_MENU" install --novendor "@LINUX_TARGET_RESOURCE_DIRECTORY@/trenchbroom.desktop"
test -d "/usr/share//desktop-directories" && "$XDG_DESKTOP_MENU" install --novendor "@LINUX_TARGET_RESOURCE_DIRECTORY@/trenchbroom.desktop"


# Update menu cache
Expand Down
2 changes: 1 addition & 1 deletion app/resources/linux/prerm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ ! -x "$XDG_DESKTOP_MENU" ]; then
echo "Error: Could not find xdg-desktop-menu" >&2
exit 1
fi
"$XDG_DESKTOP_MENU" uninstall "@LINUX_TARGET_RESOURCE_DIRECTORY@/trenchbroom.desktop"
test -d "/usr/share//desktop-directories" && "$XDG_DESKTOP_MENU" uninstall "@LINUX_TARGET_RESOURCE_DIRECTORY@/trenchbroom.desktop"

# Update menu cache
UPDATE_MENUS="`which update-menus 2> /dev/null || true`"
Expand Down

0 comments on commit ff361e1

Please sign in to comment.