diff options
author | opalmay <[email protected]> | 2022-10-14 19:33:08 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-14 18:33:08 +0200 |
commit | 1fbdcabf1915b35599c7912a45ef92888417ea65 (patch) | |
tree | ede4192a5aaca0b16bdfc5511546d623c2d6cd72 /utils/installer/install.sh | |
parent | 4586140260b50ba81bca53cd90c91c22e28ee5ca (diff) |
fix: don't install desktop file w/o xdg-desktop-menu (#3229)
Diffstat (limited to 'utils/installer/install.sh')
-rwxr-xr-x | utils/installer/install.sh | 5 |
1 files changed, 2 insertions, 3 deletions
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() { |