mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
13 lines
271 B
Bash
13 lines
271 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# 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
|