aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-11 17:31:49 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-11 17:31:49 +0000
commit49e3d833534b0ca022106fb180fa66c318c52eb9 (patch)
tree6f5f1fbb083225f22a24bb90d8a483abd02c8347
parent6c3481c740218656943fc5d6597ab34408114490 (diff)
downloadpaludis-49e3d833534b0ca022106fb180fa66c318c52eb9.tar.gz
paludis-49e3d833534b0ca022106fb180fa66c318c52eb9.tar.xz
Remove dead symlinks before relinking
-rwxr-xr-xebuild/utils/merge2
1 files changed, 1 insertions, 1 deletions
diff --git a/ebuild/utils/merge b/ebuild/utils/merge
index b38e37b..a314ead 100755
--- a/ebuild/utils/merge
+++ b/ebuild/utils/merge
@@ -74,7 +74,7 @@ merge_this()
fi
if [[ -L "${f}" ]] ; then
- if [[ -e "${2}/${ff}" ]] && ! rm -f "${2}/${ff}" ; then
+ if ( [[ -e "${2}/${ff}" ]] || [[ -h "${2}/${ff}" ]] ) && ! rm -f "${2}/${ff}" ; then
echo "error removing ${2}/${ff} for link ${f}"
r=1
elif ! ln -s "$(readlink ${f} )" "${2}/${ff}" ; then