diff options
author | Anton Maklakov <anton@espressif.com> | 2018-06-13 13:41:13 +0800 |
---|---|---|
committer | Anton Maklakov <anton@espressif.com> | 2018-11-05 15:49:51 +0800 |
commit | b36e89d29460c57edb731253ab30d6db6d29e313 (patch) | |
tree | 07b2c922d0d2c876c0b7c4c71ae2775f3138f67c /scripts/functions | |
parent | 2808fdb6a3e0d197331d77aef0e70320507addef (diff) | |
download | crosstool-ng-b36e89d29460c57edb731253ab30d6db6d29e313.tar.gz crosstool-ng-b36e89d29460c57edb731253ab30d6db6d29e313.tar.bz2 crosstool-ng-b36e89d29460c57edb731253ab30d6db6d29e313.zip |
Add an ability to use a regular directory for overlaying. If it doesn't exist, the tarball is still used
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/functions b/scripts/functions index ab235d89..b71734b9 100644 --- a/scripts/functions +++ b/scripts/functions @@ -2146,11 +2146,15 @@ 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 + 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 - CT_Extract "${overlay}${ext}" "${CT_BUILD_DIR}/overlay" fi # Can use common location only if using non-custom source, only bundled patches |