diff options
author | 2017-04-05 22:06:20 -0400 | |
---|---|---|
committer | 2017-04-05 22:06:20 -0400 | |
commit | 67a44d0df1b0fc165104da3deefa10501ec2e9cc (patch) | |
tree | 1b6e482727d5b742361efcf34903663263f96734 | |
parent | wine.eselect: Fix bad logicc in are_symlinks_valid for bin (diff) | |
download | eselect-wine-67a44d0df1b0fc165104da3deefa10501ec2e9cc.tar.gz eselect-wine-67a44d0df1b0fc165104da3deefa10501ec2e9cc.tar.bz2 eselect-wine-67a44d0df1b0fc165104da3deefa10501ec2e9cc.zip |
wine.eselect: Handle symlinks that have been deleted
-rw-r--r-- | wine.eselect | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/wine.eselect b/wine.eselect index 44ece59..f25ef0c 100644 --- a/wine.eselect +++ b/wine.eselect @@ -732,10 +732,14 @@ remove_symlinks() { die -q "Missing listing of ${var} symlinks" fi for symlink in ${symlinks[@]}; do - if [[ ! -L "${symlink}" ]]; then - die -q "${symlink} is not a symlink." + if [[ -e "${symlink}" ]]; then + if [[ ! -L "${symlink}" ]]; then + die -q "${symlink} is not a symlink." + fi + rm "${symlink}" || die "Failed to rm ${symlink}" + else + write_warning_msg "${symlink} symlink was missing." fi - rm "${symlink}" || die "Failed to rm ${symlink}" # remove entry from config file symlinks=$(list_rm_item "${symlink}" "${symlinks}") |