diff --git a/scripts/build b/scripts/build index 71ec2b9da9..c8592f6717 100755 --- a/scripts/build +++ b/scripts/build @@ -43,15 +43,14 @@ STAMP=${STAMPS}/${PKG_NAME}/build_${TARGET} if [ -f ${STAMP} ]; then . ${STAMP} PKG_DEEPHASH=$(calculate_stamp) - if [ ! "${PKG_DEEPHASH}" = "${STAMP_PKG_DEEPHASH}" ]; then - rm -f ${STAMP} - elif [ ! "${BUILD_WITH_DEBUG}" = "${STAMP_BUILD_WITH_DEBUG}" ]; then - rm -f ${STAMP} - else + + if [ "${PKG_DEEPHASH}" = "${STAMP_PKG_DEEPHASH}" -a "${BUILD_WITH_DEBUG}" = "${STAMP_BUILD_WITH_DEBUG}" ]; then # stamp matched: already built, do nothing pkg_lock_status "UNLOCK" "${PKG_NAME}:${TARGET}" "build" "already built" exit 0 fi + + rm -f ${STAMP} fi if [ -n "${PKG_DEPENDS_UNPACK}" ]; then @@ -216,9 +215,7 @@ pkg_lock_status "ACTIVE" "${PKG_NAME}:${TARGET}" "build" pkg_call_exists pre_build_${TARGET} && pkg_call pre_build_${TARGET} # ensure ${PKG_BUILD} is there. (installer? PKG_URL="") -if [ ! -d "${PKG_BUILD}" ] ; then - mkdir -p "${PKG_BUILD}" -fi +mkdir -p "${PKG_BUILD}" cd "${PKG_BUILD}" diff --git a/scripts/install b/scripts/install index a2fdcf6a16..187dcc34cc 100755 --- a/scripts/install +++ b/scripts/install @@ -36,8 +36,10 @@ PARENT_PKG="${2:-${PKG_NAME}:${TARGET}}" pkg_lock "${PKG_NAME}:${TARGET}" "install" "${PARENT_PKG}" STAMP=${STAMPS_INSTALL}/${PKG_NAME}/install_${TARGET} -[ -f ${STAMP} ] && pkg_lock_status "UNLOCK" "${PKG_NAME}:${TARGET}" "install" "already installed" -[ -f ${STAMP} ] && exit 0 +if [ -f ${STAMP} ]; then + pkg_lock_status "UNLOCK" "${PKG_NAME}:${TARGET}" "install" "already installed" + exit 0 +fi mkdir -p ${STAMPS_INSTALL}/${PKG_NAME}