mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-01 19:41:27 -05:00
There is no need to generate this script when the only variable part in it is a comment. Reword the comment. Closes: #2122 Approved by: matthiasclasen
16 lines
497 B
Bash
16 lines
497 B
Bash
# set XDG_DATA_DIRS to include Flatpak installations
|
|
|
|
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)
|
|
|
|
export XDG_DATA_DIRS
|
|
XDG_DATA_DIRS="${new_dirs:+${new_dirs}:}${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
|