Fix hook to run when $HOME is not explicitly set

This commit is contained in:
2014-09-07 21:59:35 +01:00
parent e1a2d30ab9
commit dbbc7089ff

View File

@@ -30,6 +30,13 @@ if [[ $? -ne 0 ]]; then
exit 1
fi
if [[ "x${HOME}" == "x" ]]; then
id=`whoami`
HOME=`eval echo ~${id}`
export HOME
fi
echo "HOME is ${HOME}" 1>&2
tmpdir=`mktemp -d`
tmpfile="$tmpdir/candidate"