diff options
-rw-r--r-- | rust.eselect.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rust.eselect.in b/rust.eselect.in index 9de7149..1b33280 100644 --- a/rust.eselect.in +++ b/rust.eselect.in @@ -18,6 +18,16 @@ find_missing_broken_symlinks() { local -a missing_symlinks local required_symlinks=( "/usr/bin/rustc" $(get_last_set_symlinks) ) + local target=$(get_current_target) + if [ "${target}" != "NOT_SET" ]; then + # make sure we add new symlinks for new targets, + # i.e. after changed USE flags + required_symlinks+=( $(get_symlinks ${target}) ) + fi + + required_symlinks=( $(printf "%s\n" "${required_symlinks[@]}" | sort -u) ) + + local i for i in "${required_symlinks[@]}"; do local symlink="${EROOT%/}${i}" |