Personally I'd like to adhere to to XDG Base Directory Specification to make my utility more portable.
However when doing so it requires me to re-implement for systems that do not have the XDG_ parameters implemented.
This on it's own is not much of a problem as the XDG Base Directory Specification covers this detailing what to do instead. For example if XDG_DATA_HOME
is unset or empty use ~/.local/share
instead.
However what to do if $HOME
is unset or empty?
Should I adhere to the system wide options at least for where it is in the XDGBDS given (e.g. no $HOME but more /etc/something etc.)?
Honestly I have very little experience under which circumstances $HOME
actually is empty, so it's hard for me to decide well here.