diff options
author | Alexey Neyman <stilor@att.net> | 2017-10-20 09:26:20 -0700 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2017-10-20 09:27:29 -0700 |
commit | a91765156a2235be14b4c58170148f081badf5e7 (patch) | |
tree | bdad81e48e130546108ef966ed5d021244c91754 /scripts/functions | |
parent | 42429d9169720b2c3ae791780580538de237efe0 (diff) | |
download | crosstool-ng-a91765156a2235be14b4c58170148f081badf5e7.tar.gz crosstool-ng-a91765156a2235be14b4c58170148f081badf5e7.tar.bz2 crosstool-ng-a91765156a2235be14b4c58170148f081badf5e7.zip |
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/functions | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions index d133d863..402de86a 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}" |