|
Lines 169-174
Link Here
|
| 169 |
fi |
169 |
fi |
| 170 |
fi |
170 |
fi |
| 171 |
fi |
171 |
fi |
|
|
172 |
if [ -d $TDEDIR/share/man ]; then |
| 173 |
if [ "`echo $MANPATH | grep \"$TDEDIR/share/man\"`" = "" ]; then |
| 174 |
export MANPATH=$TDEDIR/share/man:$MANPATH |
| 175 |
fi |
| 176 |
fi |
| 172 |
|
177 |
|
| 173 |
if [ "$XDG_CONFIG_DIRS" = "" ]; then |
178 |
if [ "$XDG_CONFIG_DIRS" = "" ]; then |
| 174 |
if [ -d /etc/xdg ]; then |
179 |
if [ -d /etc/xdg ]; then |
|
Lines 197-203
Link Here
|
| 197 |
if [ "$XDG_CONFIG_DIRS" = "" ]; then |
202 |
if [ "$XDG_CONFIG_DIRS" = "" ]; then |
| 198 |
XDG_CONFIG_DIRS=$TDE_XDG_DIR |
203 |
XDG_CONFIG_DIRS=$TDE_XDG_DIR |
| 199 |
else |
204 |
else |
| 200 |
XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:$TDE_XDG_DIR |
205 |
XDG_CONFIG_DIRS=$TDE_XDG_DIR:$XDG_CONFIG_DIRS |
| 201 |
fi |
206 |
fi |
| 202 |
fi |
207 |
fi |
| 203 |
fi |
208 |
fi |
|
Lines 207-230
Link Here
|
| 207 |
|
212 |
|
| 208 |
# Explicitly set $XDG_DATA_DIRS only when Trinity is not installed in /usr. |
213 |
# Explicitly set $XDG_DATA_DIRS only when Trinity is not installed in /usr. |
| 209 |
# Explicitly declaring $XDG_DATA_DIRS will override the default search path of /usr/share. |
214 |
# Explicitly declaring $XDG_DATA_DIRS will override the default search path of /usr/share. |
|
|
215 |
# Explicitly declaring $XDG_DATA_DIRS will override $TDEDIRS, which must then be |
| 216 |
# explicitly identified in the $XDG_DATA_DIRS string to remain useful. |
| 217 |
# The $TDEDIR variable is intended to be singular and $TDEDIRS plural. When $TDEDIRS |
| 218 |
# exists in the environment then parse that variable into separate directories. |
| 219 |
# $TDEDIRS should contain whatever is set in $TDEDIR. Therefore any additional directories |
| 220 |
# set in $TDEDIRS are intended to override data files found in $TDEDIR. Those additional |
| 221 |
# directories should be placed before $TDEDIR and before /usr/share. |
| 210 |
if [ "$TDEDIR" != "/usr" ] && [ -d $TDEDIR/share ]; then |
222 |
if [ "$TDEDIR" != "/usr" ] && [ -d $TDEDIR/share ]; then |
| 211 |
if [ "$XDG_DATA_DIRS" = "" ]; then |
223 |
if [ "$XDG_DATA_DIRS" = "" ]; then |
| 212 |
# Ensure the standard location of /usr/share is included. |
224 |
# Ensure the standard location of /usr/share is included. |
| 213 |
XDG_DATA_DIRS=/usr/share |
225 |
XDG_DATA_DIRS=/usr/share |
| 214 |
else |
226 |
else |
| 215 |
if [ "`echo $XDG_DATA_DIRS | grep \"/usr/share\"`" = "" ]; then |
227 |
if [ "`echo $XDG_DATA_DIRS | grep \"/usr/share\"`" = "" ]; then |
| 216 |
XDG_DATA_DIRS=/usr/share:$XDG_DATA_DIRS |
228 |
XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share |
| 217 |
fi |
229 |
fi |
| 218 |
fi |
230 |
fi |
| 219 |
if [ "`echo $XDG_DATA_DIRS | grep \"$TDEDIR/share\"`" = "" ]; then |
231 |
if [ "`echo $XDG_DATA_DIRS | grep \"$TDEDIR/share\"`" = "" ]; then |
| 220 |
XDG_DATA_DIRS=$XDG_DATA_DIRS:$TDEDIR/share |
232 |
XDG_DATA_DIRS=$TDEDIR/share:$XDG_DATA_DIRS |
| 221 |
fi |
233 |
fi |
| 222 |
export XDG_DATA_DIRS |
234 |
if [ "$TDEDIRS" != "" ]; then |
| 223 |
fi |
235 |
for ((i=`echo $TDEDIRS | awk -F : '{print NF}'`;i>=1;i--)); do |
| 224 |
if [ -d $TDEDIR/share/man ]; then |
236 |
if [ "`echo $XDG_DATA_DIRS | grep \"\`echo $TDEDIRS | cut -d: -f${i}\`\"`" = "" ]; then |
| 225 |
if [ "`echo $MANPATH | grep \"$TDEDIR/share/man\"`" = "" ]; then |
237 |
XDG_DATA_DIRS=`echo $TDEDIRS | cut -d: -f${i}`/share:$XDG_DATA_DIRS |
| 226 |
export MANPATH=$TDEDIR/share/man:$MANPATH |
238 |
fi |
|
|
239 |
done |
| 227 |
fi |
240 |
fi |
|
|
241 |
export XDG_DATA_DIRS |
| 228 |
fi |
242 |
fi |
| 229 |
|
243 |
|
| 230 |
test -n "$TDEHOME" && tdehome=`echo "$TDEHOME" | sed "s,^~/,$HOME/,"` |
244 |
test -n "$TDEHOME" && tdehome=`echo "$TDEHOME" | sed "s,^~/,$HOME/,"` |