diff options
author | Thomas Matthijs <axxo@gentoo.org> | 2005-09-10 16:37:32 +0000 |
---|---|---|
committer | Thomas Matthijs <axxo@gentoo.org> | 2005-09-10 16:37:32 +0000 |
commit | be0a72a599380338b818a3cbb2af10afc4072af0 (patch) | |
tree | ecf5d48e9b94ae51adc049ca6013ce495c7b660f /eclass | |
parent | New package for PHP-GTK (PHP 4). (diff) | |
download | gentoo-2-be0a72a599380338b818a3cbb2af10afc4072af0.tar.gz gentoo-2-be0a72a599380338b818a3cbb2af10afc4072af0.tar.bz2 gentoo-2-be0a72a599380338b818a3cbb2af10afc4072af0.zip |
prevent it from following symlinks
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/java-pkg.eclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/eclass/java-pkg.eclass b/eclass/java-pkg.eclass index f656b2f5bddc..e93de41795aa 100644 --- a/eclass/java-pkg.eclass +++ b/eclass/java-pkg.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.29 2005/08/20 18:13:31 axxo Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.30 2005/09/10 16:37:32 axxo Exp $ pkglistpath="${T}/java-pkg-list" @@ -283,9 +283,11 @@ java-pkg_jar-from() fi _record-jar ${pkg} ${x} if [ -z "${jar}" ] ; then - ln -sf ${x} $(basename ${x}) + [[ -f $(basename ${x}) ]] && rm $(basename ${x}) + ln -snf ${x} $(basename ${x}) elif [ "$(basename ${x})" == "${jar}" ] ; then - ln -sf ${x} ${destjar} + [[ -f ${destjar} ]] && rm ${destjar} + ln -snf ${x} ${destjar} return 0 fi done |