This patch fixes
commit
6e62213e0294 ("templates: actually create DOWNLOAD_TEMP directory".
To use mktemp -p correctly the directories need to exist. So call mkdir -p.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
if ! command -V mktemp >/dev/null 2>&1; then
DOWNLOAD_TEMP="${DOWNLOAD_TEMP}/tmp/lxc-download.$$"
-else
+elif [ -n "${DOWNLOAD_TEMP}" ]; then
+ mkdir -p "${DOWNLOAD_TEMP}"
DOWNLOAD_TEMP="$(mktemp -p ${DOWNLOAD_TEMP} -d)"
+else
+ DOWNLOAD_TEMP="${DOWNLOAD_TEMP}$(mktemp -d)"
fi
# Simply list images