diff options
author | Mike Frysinger <vapier@gentoo.org> | 2003-09-05 16:42:45 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2003-09-05 16:42:45 +0000 |
commit | c7db28c79c7ed1f209fbb7a8e419d09496b393d8 (patch) | |
tree | 2eb9d318a684f5318e0069843fe1d395f87c916b /eclass/eutils.eclass | |
parent | Version bumped. Closes #27942 (diff) | |
download | historical-c7db28c79c7ed1f209fbb7a8e419d09496b393d8.tar.gz historical-c7db28c79c7ed1f209fbb7a8e419d09496b393d8.tar.bz2 historical-c7db28c79c7ed1f209fbb7a8e419d09496b393d8.zip |
allow for absolute paths to unpack_makeself
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 3922a8a2557a..4ac72550ac72 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.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/eutils.eclass,v 1.49 2003/09/05 15:42:30 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.50 2003/09/05 16:42:45 vapier Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # @@ -840,10 +840,19 @@ unpack_makeself() { local src=$1 local skip=$2 - [ -z "${src}" ] && src=${A} - [ -e ./${src} ] \ - && src=${PWD}/${src} \ - || src=${DISTDIR}/${src} + if [ -z "${src}" ] ; then + src="${DISTDIR}/${A}" + else + if [ -e "${DISTDIR}/${src}" ] ; then + src="${DISTDIR}/${src}" + elif [ -e "${PWD}/${src}" ] ; then + src="${PWD}/${src}" + elif [ -e "${src}" ] ; then + src="${src}" + fi + fi + [ ! -e "${src}" ] && die "Could not find requested makeself archive ${src}" + local shrtsrc=`basename ${src}` echo ">>> Unpacking ${shrtsrc} to ${PWD}" if [ -z "${skip}" ] ; then |