summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-04-01 17:12:05 (GMT)
committerAlexey Neyman <stilor@att.net>2017-04-01 17:12:05 (GMT)
commitd6bf8e2d9866c6c3618e5053aca01df7fe7d61d0 (patch)
treecd27410ed6cc009a730ffd59efc399c5002c32ca /scripts/functions
parent88d28e6eed547e9992c44c6894764dd7b000b980 (diff)
Fix symlinking to multiarch tools on Cygwin
On cygwin, creating both "foo.exe" and "foo" results in 'ln -sf' returning an error ("File exists"). However, ln silently removes the "foo.exe" in this case, so an attempt to re-run the same command manually then succeeds. Hence, make binutils.sh also create symlinks with .exe prefix, using the new & shiny routine. 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 0ba96b4..2bc2dac 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -1784,7 +1784,11 @@ CT_SymlinkTools()
CT_Pushd "${srcdir}"
for t in "${CT_TARGET}-"*; do
- if [ -n "${newpfx}" -a "${newpfx}" != "${CT_TARGET}" ]; then
+ if [ "${t}" = "${CT_TARGET}-*" ]; then
+ # No matching files
+ break
+ fi
+ if [ "${newpfx}" != "${CT_TARGET}" -o "${bindir}" != "${srcdir}" ]; then
_t="${newpfx}-${t#${CT_TARGET}-}"
CT_DoExecLog ALL ln -sfv "${dirpfx}${t}" "${bindir}/${_t}"
fi