From 488f39456f72b378ca57a671599d68e1970a2844 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Diego=20Elio=20Petten=C3=B2?= Date: Fri, 30 Apr 2010 17:40:10 +0000 Subject: [PATCH] Create a special handling of S variable for github-based packages. Since using GitHub is widely common for Ruby packages, especially those not packaging the tests within the gem, we would be reimplementing this so many times that it's worth special casing here. --- eclass/ruby-ng.eclass | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index 41ffede517d9..12ac03e90058 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.11 2010/04/26 15:07:58 a3li Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.12 2010/04/30 17:40:10 flameeyes Exp $ # # @ECLASS: ruby-ng.eclass # @MAINTAINER: @@ -216,7 +216,16 @@ done _ruby_invoke_environment() { old_S=${S} - sub_S=${S#${WORKDIR}} + sub_S=${S#${WORKDIR}/} + + # Special case, for the always-lovely GitHub fetches. With this, + # we allow the star glob to just expand to whatever directory it's + # called. + if [[ ${sub_S} = *"*" ]]; then + pushd "${WORKDIR}"/all &>/dev/null + sub_S=$(eval ls -d ${sub_S}) + popd &>/dev/null + fi environment=$1; shift -- 2.26.2