Files
clr-installer/scripts/developer-image-post.sh
T
Mark D Horn e1e779ce98 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>
2019-03-05 11:01:55 -08:00

17 lines
291 B
Bash
Executable File

#!/bin/bash
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}
scripts/installer-post.sh ${DESTDIR}
cd ${SAVE_DIR}
/bin/rm -rf ${TEMP_INST}
exit 0