diff options
Diffstat (limited to 'postgresql.eselect')
-rw-r--r-- | postgresql.eselect | 11 |
1 files 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 "/". |