diff options
author | NP-Hardass <np.hardass@gmail.com> | 2017-04-06 14:15:54 -0400 |
---|---|---|
committer | NP-Hardass <np.hardass@gmail.com> | 2017-04-06 14:15:54 -0400 |
commit | f279a7c0ef11c595ca538221cbc39bb760c9a28f (patch) | |
tree | 9f343e5d4fdab671da3b8b2f6ed920998b6ffcbb /wine.eselect | |
parent | wine.eselect: are_symlinks_valid: convert die to err msg and return 1 (diff) | |
download | eselect-wine-f279a7c0ef11c595ca538221cbc39bb760c9a28f.tar.gz eselect-wine-f279a7c0ef11c595ca538221cbc39bb760c9a28f.tar.bz2 eselect-wine-f279a7c0ef11c595ca538221cbc39bb760c9a28f.zip |
wine.eselect: Handle setting links when encountering orphaned linksv1.0
Diffstat (limited to 'wine.eselect')
-rw-r--r-- | wine.eselect | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wine.eselect b/wine.eselect index 8d2f8fc..94741b4 100644 --- a/wine.eselect +++ b/wine.eselect @@ -816,6 +816,10 @@ set_symlinks() { for b in "${wine_bin}"/*; do link="${EPREFIX}/usr/bin/${b##*/}${v_arg#-}" local linktgt="${EPREFIX}/usr/bin/${b##*/}${tgt##wine}" + if [[ -L "${link}" ]]; then + write_warning_msg "${link} already exists, overwriting" + rm "${link}" || die -q "Failed to rm old link: ${link}" + fi ln -s "${linktgt}" "${link}" if [[ $? -ne 0 ]]; then write_warning_msg "Failed to set symlink from ${linktgt} to ${link}" @@ -832,6 +836,10 @@ set_symlinks() { for md in "${wine_man}"/*; do for m in "${md}"/*; do link="${EPREFIX}/usr/share/man/${md##*/}/${m##*/}${v_arg#-}" + if [[ -L "${link}" ]]; then + write_warning_msg "${link} already exists, overwriting" + rm "${link}" || die -q "Failed to rm old link: ${link}" + fi ln -s "${m}" "${link}" if [[ $? -ne 0 ]]; then write_warning_msg "Failed to set symlink from ${m} to ${link}" |