Ensure HOME is set for post hook as root

Even though we are running as a login shell, the HOME is
not being set and hence neither is GOCACHE which is required
for golang 1.12 and beyond.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This commit is contained in:
Mark D Horn
2019-03-05 11:01:55 -08:00
committed by Mark Horn
parent b935971cb1
commit e1e779ce98
+1
View File
@@ -3,6 +3,7 @@
DESTDIR=$1
SAVE_DIR=$(pwd)
TEMP_INST=$(mktemp -d)
export HOME=$(getent passwd $(id -un) |& awk -F: '{print $(NF-1)}')
git clone . ${TEMP_INST}
cd ${TEMP_INST}
make install DESTDIR=${DESTDIR}