From 1fbdcabf1915b35599c7912a45ef92888417ea65 Mon Sep 17 00:00:00 2001 From: opalmay <65673442+opalmay@users.noreply.github.com> Date: Fri, 14 Oct 2022 19:33:08 +0300 Subject: fix: don't install desktop file w/o xdg-desktop-menu (#3229) --- utils/installer/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'utils/installer/install.sh') diff --git a/utils/installer/install.sh b/utils/installer/install.sh index bd751abe..87f60fd4 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -458,7 +458,7 @@ function setup_lvim() { function create_desktop_file() { OS="$(uname -s)" # TODO: Any other OSes that use desktop files? - [ "$OS" != "Linux" ] && return + ([ "$OS" != "Linux" ] || ! command -v xdg-desktop-menu &>/dev/null) && return echo "Creating desktop file" for d in "$LUNARVIM_BASE_DIR"/utils/desktop/*/; do @@ -467,8 +467,7 @@ function create_desktop_file() { cp "$LUNARVIM_BASE_DIR/utils/desktop/$size_folder/lvim.svg" "$XDG_DATA_HOME/icons/hicolor/$size_folder/apps" done - cp "$LUNARVIM_BASE_DIR/utils/desktop/lvim.desktop" "$XDG_DATA_HOME/applications/lvim.desktop" - xdg-desktop-menu forceupdate + xdg-desktop-menu install --novendor "$LUNARVIM_BASE_DIR/utils/desktop/lvim.desktop" } function print_logo() { -- cgit v1.2.3