2 # SPDX-License-Identifier: MIT-0
4 # set the default value
5 XDG_DATA_DIRS
="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share}"
7 # add a directory if it exists
8 if [ -d /opt
/foo
/share
]; then
9 XDG_DATA_DIRS
="/opt/foo/share:${XDG_DATA_DIRS}"
13 echo "XDG_DATA_DIRS=${XDG_DATA_DIRS}"