Comment 1 for bug 800193

Revision history for this message
Loïc Minier (lool) wrote :

The provided snippet was incorrect, but this should work:

# Load resources
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
    if [ -f "$file" ]; then
        echo "Loading resource: $file"
        xrdb -nocpp -merge "$file"
    elif [ -d "$file" ]; then
        for i in `ls "$file"`; do
            if [ -r "$file/$i" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
                echo "Loading resource: $file/$i"
                xrdb -nocpp -merge "$file/$i"
            fi
        done
    fi
done