summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-10-20 16:26:20 (GMT)
committerAlexey Neyman <stilor@att.net>2017-10-20 16:27:29 (GMT)
commita91765156a2235be14b4c58170148f081badf5e7 (patch)
treebdad81e48e130546108ef966ed5d021244c91754 /scripts/functions
parent42429d9169720b2c3ae791780580538de237efe0 (diff)
When handling overlay, move rather than symlink
... as 'tar' does not follow symlink, rather creating a new directory instead. Fixes #846. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index d133d86..402de86 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -2158,7 +2158,7 @@ CT_DoExtractPatch()
CT_DoLog WARN "${pkg_name}: using custom location, no patches applied"
fi
- # Symlink/copy/overlay into per-target source directory
+ # Symlink/move/copy into per-target source directory
if [ "${src_custom}" = "y" ]; then
# Custom sources: unpack or copy into per-target directory. Note that
# ${src_dir} is never ${CT_COMMON_SRC_DIR} in this case.
@@ -2175,6 +2175,10 @@ CT_DoExtractPatch()
else
CT_Abort "Neither file nor directory: ${custom_location}"
fi
+ elif [ "${src_dir}" = "${CT_SRC_DIR}" ]; then
+ # Sources specific to this target, just move (if we use overlay, symlinks
+ # would be overwritten and overlayed files will end up in a separate dir).
+ CT_DoExecLog ALL mv "${src_dir}/${basename}" "${CT_SRC_DIR}/${dir_name}"
else
# Common source, just symlink
CT_DoExecLog ALL ln -s "${src_dir}/${basename}" "${CT_SRC_DIR}/${dir_name}"