summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/functions b/scripts/functions
index b15601a..2e4d4fa 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -1034,6 +1034,8 @@ CT_Patch() {
local -a patch_dirs
local bundled_patch_dir
local local_patch_dir
+ local bundled_exp_patch_dir
+ local local_exp_patch_dir
if [ "${nochdir}" = "nochdir" ]; then
shift
@@ -1072,11 +1074,17 @@ CT_Patch() {
bundled_patch_dir="${CT_LIB_DIR}/patches/${pkgname}/${version}"
local_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkgname}/${version}"
+ # Check for experimental patches, if enabled.
+ if [ "${CT_EXPERIMENTAL_PATCHES}" = "y" ]; then
+ bundled_exp_patch_dir="${CT_LIB_DIR}/patches/experimental/${pkgname}/${version}"
+ local_exp_patch_dir="${CT_LOCAL_PATCH_DIR}/experimental/${pkgname}/${version}"
+ fi
+
case "${CT_PATCH_ORDER}" in
- bundled) patch_dirs=("${bundled_patch_dir}");;
- local) patch_dirs=("${local_patch_dir}");;
- bundled,local) patch_dirs=("${bundled_patch_dir}" "${local_patch_dir}");;
- local,bundled) patch_dirs=("${local_patch_dir}" "${bundled_patch_dir}");;
+ bundled) patch_dirs=("${bundled_patch_dir}" "${bundled_exp_patch_dir}");;
+ local) patch_dirs=("${local_patch_dir}" "${local_exp_patch_dir}");;
+ bundled,local) patch_dirs=("${bundled_patch_dir}" "${bundled_exp_patch_dir}" "${local_patch_dir}" "${local_exp_patch_dir}");;
+ local,bundled) patch_dirs=("${local_patch_dir}" "${local_exp_patch_dir}" "${bundled_patch_dir}" "${bundled_exp_patch_dir}");;
none) patch_dirs=;;
esac