summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--scripts/functions11
2 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 791cb7a..19eb521 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,6 +126,7 @@ CTNG_CHECK_PROGS_REQ([xz], [xz])
CTNG_CHECK_PROGS_REQ([unzip], [unzip])
CTNG_CHECK_PROGS_REQ([help2man], [help2man])
CTNG_CHECK_PROGS_REQ([file], [file])
+CTNG_CHECK_PROGS_REQ([which], [which])
# Not a fatal failure even if we have neither - the tarballs may
# be provided in a local directory.
diff --git a/scripts/functions b/scripts/functions
index 81406c3..491c759 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -2146,11 +2146,14 @@ 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}"
- ext=`CT_GetFileExtension "${overlay}"`
- if [ ! -r "${overlay}${ext}" ]; then
- CT_Abort "Overlay ${overlay} not found"
+ if [ -d "${overlay}" ]; then
+ CT_DoExecLog ALL cp -av "${overlay}/." "${CT_BUILD_DIR}/overlay"
+ else
+ if ! ext=`CT_GetFileExtension "${overlay}"`; then
+ CT_Abort "Overlay ${overlay} not found"
+ fi
+ CT_Extract "${overlay}${ext}" "${CT_BUILD_DIR}/overlay"
fi
- CT_Extract "${overlay}${ext}" "${CT_BUILD_DIR}/overlay"
fi
# Can use common location only if using non-custom source, only bundled patches