Give a less confusing error message when unpack() arguments begin with ${DISTDIR...
authorZac Medico <zmedico@gentoo.org>
Mon, 8 May 2006 17:55:58 +0000 (17:55 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 8 May 2006 17:55:58 +0000 (17:55 -0000)
svn path=/main/trunk/; revision=3333

bin/ebuild.sh

index 70fffc1ba7decf4cd8462b7e7f1c650f20de57bc..b3f34d6ea0e8ca959d5751006a4ed57dd4f6e664 100755 (executable)
@@ -365,6 +365,8 @@ unpack() {
                else
                        srcdir="${DISTDIR}/"
                fi
+               [ "${x}" != "${x/${DISTDIR}}" ] && \
+                       die "Arguments to unpack() should not begin with \${DISTDIR}."
                [ ! -s "${srcdir}${x}" ] && die "$myfail"
 
                myfail="failure unpacking ${x}"