https://bugzilla.novell.com/show_bug.cgi?id=300678#c43
--- Comment #43 from Dr. Werner Fink 2007-10-22 08:43:28 MST ---
The csh variant uses something like
if ( ! ${?XDG_DATA_DIRS} ) then
set XDG_DATA_DIRS
else
set XDG_DATA_DIRS=(${XDG_DATA_DIRS:as/:/ /})
endif
set nonomatch
foreach xdgdir (/usr/local/share /usr/share /etc/opt/*/share /opt/*/share
/usr/share/gnome/help)
if ( -d $xdgdir ) then
set -l XDG_DATA_DIRS=($XDG_DATA_DIRS $xdgdir)
endif
end
unset nonomatch
set xdgdir="${XDG_DATA_DIRS:q}"
unset XDG_DATA_DIRS
setenv XDG_DATA_DIRS "${xdgdir:as/ /:/}"
unset xdgdir
that is that `set -l' appends the directory only if it exist and if
not already included in the array. Please note that the environment
variable XDG_DATA_DIRS is independed from the shell variable
XDG_DATA_DIRS (this is different from bourne shells).
The only problem I see is the usage of `:' within path names but
this is IMHO a broken usage on a UNIX/Linux system.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.