Add an ability to use a regular directory for overlaying. If it doesn't exist, the tarball is still used

This commit is contained in:
Anton Maklakov
2018-06-13 13:41:13 +08:00
parent 2808fdb6a3
commit b36e89d294

View File

@ -2146,12 +2146,16 @@ CT_DoExtractPatch()
if [ "${CT_TARGET_USE_OVERLAY}" = "y" -a ! -d "${CT_BUILD_DIR}/overlay" ]; then
CT_DoExecLog ALL mkdir -p "${CT_BUILD_DIR}/overlay"
overlay="${CT_OVERLAY_LOCATION}/${CT_ARCH}_${CT_OVERLAY_NAME:-overlay}"
if [ -d "${overlay}" ]; then
CT_DoExecLog ALL cp -av "${overlay}/." "${CT_BUILD_DIR}/overlay"
else
ext=`CT_GetFileExtension "${overlay}"`
if [ ! -r "${overlay}${ext}" ]; then
CT_Abort "Overlay ${overlay} not found"
fi
CT_Extract "${overlay}${ext}" "${CT_BUILD_DIR}/overlay"
fi
fi
# Can use common location only if using non-custom source, only bundled patches
# and no overlays. Otherwise, this source directory is custom-tailored for this