* Vincent Untz
Hi,
As I needed a directory to put some openSUSE-specific data for each user, I was looking at what directory to use. I was not aware of any such directory, so after quickly asking around, I decided to use this:
if test "x$XDG_CONFIG_HOME" = "x"; then XDG_CONFIG_HOME="$HOME/.config" fi SUSE_DIR="$XDG_CONFIG_HOME/suse"
You can shorten that by taking advantage of parameter expansion: SUSE_DIR="${XDG_CONFIG_HOME:-${HOME}/.config}/suse"
Note that XDG_CONFIG_HOME should be created with "mkdir -p -m 0700". Doing "mkdir -p -m 0700 $SUSE_DIR" will not create XDG_CONFIG_HOME with the right permissions, as far as I can tell (don't know if it's a feature or a bug).
This is not a bug, POSIX/SUSv4 specifies that all non-existing pathname components except the last on will be created according to the current umask. -- Guido Berhoerster -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org