mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-31 02:51:22 -05:00
This is a script that program that gets run by systemd before every user service to set up the environment. See systemd.environment-generator(7) for details. Closes: #2122 Approved by: matthiasclasen
16 lines
472 B
Bash
Executable File
16 lines
472 B
Bash
Executable File
#!/bin/bash
|
|
|
|
new_dirs=
|
|
while read -r install_path
|
|
do
|
|
share_path=$install_path/exports/share
|
|
case ":$XDG_DATA_DIRS:" in
|
|
*":$share_path:"*) :;;
|
|
*":$share_path/:"*) :;;
|
|
*) new_dirs=${new_dirs:+${new_dirs}:}$share_path;;
|
|
esac
|
|
done < <(echo "${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak"; flatpak --installations)
|
|
|
|
XDG_DATA_DIRS="${new_dirs:+${new_dirs}:}${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
|
|
echo "XDG_DATA_DIRS=$XDG_DATA_DIRS"
|