Here "${HOME:=}"
is a more or less a no-op, since it returns $HOME if it's set and nothing if it's not.
if [ "${HOME:=}" != "" ] && [ -d ${HOME} ]
This would function identically:
if [ "${HOME}" != "" ] && [ -d ${HOME} ]
If you had something after the equal sign, the first part of the if
would always be true.
if [ "${HOME:=here}" != "" ] && [ -d ${HOME} ]
whatever happened you'd always get a string that's not equal to "".
However, this would depend on whether $HOME and $DEFAULT were both null:
if [ "${HOME:=$DEFAULT}" != "" ] && [ -d ${HOME} ]