build-unit-test-docker: Fix home dir creation
`adduser` does not recursively create home directories. If the current
user has a non-standard home directory the command will fail and the
unit test builder will error out. Lets make sure the parent directory
for the home is created first.
Change-Id: Id1cfae38b0bae445e27a1916962cd22ff0863a86
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index 9af0c5a..d510273 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -113,6 +113,7 @@
RUN cp -a json.hpp /usr/include/nlohmann/
RUN grep -q ${GROUPS} /etc/group || groupadd -g ${GROUPS} ${USER}
+RUN mkdir -p $(dirname ${HOME})
RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
RUN echo '${AUTOM4TE}' > ${AUTOM4TE_CFG}