Skip to content

Commit

Permalink
export: fix exporting desktop app. Fix #1066
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <[email protected]>
  • Loading branch information
89luca89 committed Nov 20, 2023
1 parent 3c1e0eb commit c35d792
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions distrobox-export
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export_application() {
# by its launcher name.
desktop_files=$(
# shellcheck disable=SC2086,SC2038
find ${canon_dirs} -type f -o -type l -printf '"%p"\n' |
find ${canon_dirs} -type f -printf "%p\n" -o -type l -printf '"%p"\n' |
xargs -I{} grep -le "Exec=.*${exported_app}.*" -le "Name=.*${exported_app}.*" "{}" |
xargs -I{} grep -Le "Exec=.*${DISTROBOX_ENTER_PATH:-"distrobox-enter"}.*" "{}" |
xargs -I{} printf "%s@" {}
Expand Down Expand Up @@ -382,7 +382,8 @@ export_application() {
icon_files="${icon_files}@$(find \
/usr/share/icons \
/usr/share/pixmaps \
/var/lib/flatpak/exports/share/icons -iname "*${icon}*")"
/var/lib/flatpak/exports/share/icons -iname "*${icon}*" \
-printf "%p@" 2> /dev/null || :)"
fi
done

Expand Down Expand Up @@ -482,7 +483,7 @@ export_application() {
# Update the desktop files database to ensure exported applications will
# show up in the taskbar/desktop menu/whatnot right after running this
# script.
/usr/bin/distrobox-host-exec --yes update-desktop-database "${host_home}/.local/share/applications" 2> /dev/null || :
/usr/bin/distrobox-host-exec --yes update-desktop-database "${host_home}/.local/share/applications" > /dev/null 2>&1 || :

if [ "${exported_delete}" -ne 0 ]; then
printf "Application %s successfully un-exported.\nOK!\n" "${exported_app}"
Expand Down

0 comments on commit c35d792

Please sign in to comment.