diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2015-01-03 01:49:51 +0100 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2015-01-03 01:49:51 +0100 |
commit | 41aa35a0cd2ee7c87c27500e4dd0ac1a00faa9b3 (patch) | |
tree | 371892503c84920c51b1ea1186260a1fa2c6ded5 | |
parent | 87de5d2a34aba0cbbd2ffec309b655c5871e0572 (diff) |
helper: openssl: don't cleanup at failure
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
-rw-r--r-- | helper/openssl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/helper/openssl b/helper/openssl index 5dd6cea..c00e9a6 100644 --- a/helper/openssl +++ b/helper/openssl @@ -1,6 +1,7 @@ [ -n "$OPENSSL_HELPER" ] && return || readonly OPENSSL_HELPER=1 #openssl vars +OPENSSL_BUILD_FAILED=0 OPENSSL_GIT=${OPENSSL_GIT:-git://git.openssl.org/openssl.git} OPENSSL_BRANCH="OpenSSL_1_0_1h" BASE_ARCH=${ARCH:-$(uname -m)} @@ -37,12 +38,13 @@ build_openssl() ./config --prefix="${OPENSSL_INSTALLDIR}" shared >> ${OPENSSL_SRCDIR}/log-build.log 2>&1 fi - make >> ${OPENSSL_SRCDIR}/log-build.log 2>&1 - make install >> ${OPENSSL_SRCDIR}/log-build.log 2>&1 + make >> ${OPENSSL_SRCDIR}/log-build.log 2>&1 || { OPENSSL_BUILD_FAILED=1; tail -n 40 ${OPENSSL_SRCDIR}/log-build.log; exit 1; } + make install >> ${OPENSSL_SRCDIR}/log-build.log 2>&1 || { OPENSSL_BUILD_FAILED=1; tail -n 40 ${OPENSSL_SRCDIR}/log-build.log; exit 1; } popd > /dev/null } openssl_cleanup(){ + [[ ${OPENSSL_BUILD_FAILED} -eq 1 ]] && return rm -rf ${OPENSSL_SRCDIR} rm -f ${ROOT_DIR}/log-openssl_clone.log } |