1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00
systemd-stable/man/50-xdg-data-dirs.sh

14 lines
313 B
Bash
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: CC0-1.0
# set the default value
XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share}"
# add a directory if it exists
if [[ -d /opt/foo/share ]]; then
XDG_DATA_DIRS="/opt/foo/share:${XDG_DATA_DIRS}"
fi
# write our output
echo "XDG_DATA_DIRS=${XDG_DATA_DIRS}"