summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2018-08-28 14:22:44 +0200
committerBastien Nocera <hadess@hadess.net>2018-08-29 16:48:10 +0200
commit6a3d871149958e1babed32adaafd3f42e3bdd6d0 (patch)
treebfc0d3b161c70182aee1fe3c044128a287690a95
parenta48ef1cc936b9e1ff4d593b762bb2e32f63a102f (diff)
downloadflatpak-wip/hadess/custom-installs.tar.gz
profile: Also export custom installation pathswip/hadess/custom-installs
Using the new --list-installations command. Closes: #2032
-rw-r--r--profile/flatpak.sh.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/profile/flatpak.sh.in b/profile/flatpak.sh.in
index 8b350e85..6c040408 100644
--- a/profile/flatpak.sh.in
+++ b/profile/flatpak.sh.in
@@ -1,7 +1,13 @@
# @sysconfdir@/profile.d/flatpak.sh - set XDG_DATA_DIRS
if [ "${XDG_DATA_DIRS#*flatpak}" = "${XDG_DATA_DIRS}" ]; then
- XDG_DATA_DIRS="${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak/exports/share:@localstatedir@/lib/flatpak/exports/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
+ OLD_XDG_DATA_DIRS=${XDG_DATA_DIRS}
+ XDG_DATA_DIRS="${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak/exports/share"
+ while read install_path
+ do
+ XDG_DATA_DIRS="${XDG_DATA_DIRS}:$install_path/exports/share"
+ done < <(flatpak --list-installations)
+ XDG_DATA_DIRS="${XDG_DATA_DIRS}:${OLD_XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
fi
export XDG_DATA_DIRS