commit: 3e4f034603522c95427c26fc0e9b93002397c749 Author: Aaron W. Swenson <aaron <AT> grandmasfridge <DOT> org> AuthorDate: Sun Jan 14 16:26:53 2018 +0000 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org> CommitDate: Sun Jan 14 16:26:53 2018 +0000 URL: https://gitweb.gentoo.org/proj/postgresql/eselect.git/commit/?id=3e4f0346
Just try to update symlink ln now removes an existing symlink when it tries to create one. This makes it unnecessary to first try to remove the symlink. postgresql.eselect | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/postgresql.eselect b/postgresql.eselect index d05f724..84a6e0d 100644 --- a/postgresql.eselect +++ b/postgresql.eselect @@ -80,19 +80,16 @@ linker() { local pattern=$2 local target_dir=$3 local suffix=$4 - local link_source + local findings + local link_source + local link_target local rel_source findings=$(finder "${source_dir}" "${pattern}") for link_source in ${findings} ; do - local link_target="${target_dir%/}/$(basename ${link_source})${suffix}" - - # For good measure, remove target before creating the symlink - [[ -h ${link_target} ]] && rm -f "${link_target}" - [[ -e ${link_target} ]] && \ - die -q "The target '${link_target}' still exists and could not be removed!" + link_target="${target_dir%/}/$(basename ${link_source})${suffix}" # Create relative links so that they work both here and inside the new # root if $ROOT is not "/".