mkimage-profiles/features.in/xdg-user-dirs/rootfs/image-scripts.d/35-xdg-user-dirs
Michael Shigorin d79061fb44 xdg-user-dirs: employ control feature
Maybe the conditionals shouldn't be too terse, by the way...
2013-07-15 13:56:00 +04:00

16 lines
354 B
Bash
Executable File

#!/bin/sh
# tweak xdg-user-dirs defaults if told so
# using tuples like "PHOTOS:Documents/Pictures"
. shell-config
CONFIG="/etc/xdg/user-dirs.defaults"
[ -z "$GLOBAL_XDG_USER_DIRS" ] ||
echo "$GLOBAL_XDG_USER_DIRS" \
| tr ' ' '\n' \
| while IFS=':' read k v; do
[ -n "$k" -a -n "$v" ] || continue
shell_config_set "$CONFIG" "$k" "$v"
done