aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'rust.eselect.in')
-rw-r--r--rust.eselect.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust.eselect.in b/rust.eselect.in
index c3ee046..7ab845b 100644
--- a/rust.eselect.in
+++ b/rust.eselect.in
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
DESCRIPTION="Manage the Rust compiler versions"
@@ -157,7 +157,7 @@ set_symlink() {
remove_symlink "${dest}"
- if [[ -e ${source} ]]; then
+ if [[ -e ${dest%/*}/${source} ]]; then
mkdir -p "$(dirname ${dest})" || die -q "directory creation failed for $(dirname ${dest})"
ln -s "${source}" "${dest}" || die -q "${dest} symlink setting failed"
else
@@ -197,11 +197,11 @@ set_version() {
unset_version
- set_symlink "${BIN_DIR}/rustc-${target_postfix}" "${BIN_DIR}/rustc"
+ set_symlink "rustc-${target_postfix}" "${BIN_DIR}/rustc"
local symlinks=( $(get_symlinks ${target}) )
for i in "${symlinks[@]}"; do
- set_symlink "${EROOT%/}${i}-${target_postfix}" "${EROOT%/}${i}"
+ set_symlink "${i##*/}-${target_postfix}" "${EROOT%/}${i}"
done
cp "${ENV_D_PATH}/rust/provider-${target}" \