summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2003-11-24 10:57:06 +0000
committerAlastair Tse <liquidx@gentoo.org>2003-11-24 10:57:06 +0000
commiteb56aa18923f194e4f6f1d95e376749bc0ab0ab7 (patch)
tree2b99ac5714d47171a52be8c57dff1b7185a3564f /eclass/alternatives.eclass
parentadded mgetty to the list of possible fax clients (diff)
downloadgentoo-2-eb56aa18923f194e4f6f1d95e376749bc0ab0ab7.tar.gz
gentoo-2-eb56aa18923f194e4f6f1d95e376749bc0ab0ab7.tar.bz2
gentoo-2-eb56aa18923f194e4f6f1d95e376749bc0ab0ab7.zip
use ln -sf instead of detecting symlinks
Diffstat (limited to 'eclass/alternatives.eclass')
-rw-r--r--eclass/alternatives.eclass7
1 files changed, 3 insertions, 4 deletions
diff --git a/eclass/alternatives.eclass b/eclass/alternatives.eclass
index b2a30e6779b7..6a17a381306d 100644
--- a/eclass/alternatives.eclass
+++ b/eclass/alternatives.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/alternatives.eclass,v 1.6 2003/11/01 18:33:58 liquidx Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/alternatives.eclass,v 1.7 2003/11/24 10:57:06 liquidx Exp $
# Author : Alastair Tse <liquidx@gentoo.org> (03 Oct 2003)
# Short Desc: Creates symlink to the latest version of multiple slotted
@@ -81,15 +81,14 @@ alternatives_makesym() {
for alt in ${ALTERNATIVES}; do
if [ -f "${pref}${alt}" ]; then
einfo "Linking ${alt} to ${pref}${SYMLINK}"
- [ -L "${pref}${SYMLINK}" ] && rm -f ${pref}${SYMLINK}
#are files in same directory?
if [ "${alt%/*}" = "${SYMLINK%/*}" ]
then
#yes; strip leading dirname from alt to create relative symlink
- ln -s ${alt##*/} ${pref}${SYMLINK}
+ ln -sf ${alt##*/} ${pref}${SYMLINK}
else
#no; keep absolute path
- ln -s ${pref}${alt} ${pref}${SYMLINK}
+ ln -sf ${pref}${alt} ${pref}${SYMLINK}
fi
break
fi