From: "Michal Gorny (mgorny)" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: git-2.eclass
Date: Fri, 23 Sep 2011 13:55:47 +0000 (UTC) [thread overview]
Message-ID: <20110923135547.6FF9D20035@flycatcher.gentoo.org> (raw)
mgorny 11/09/23 13:55:47
Modified: git-2.eclass
Log:
Replace variable 'eval's with ${!foo}.
Revision Changes Path
1.15 eclass/git-2.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-2.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-2.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-2.eclass?r1=1.14&r2=1.15
Index: git-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- git-2.eclass 22 Aug 2011 04:46:31 -0000 1.14
+++ git-2.eclass 23 Sep 2011 13:55:47 -0000 1.15
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.14 2011/08/22 04:46:31 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.15 2011/09/23 13:55:47 mgorny Exp $
# @ECLASS: git-2.eclass
# @MAINTAINER:
@@ -127,7 +127,8 @@
git-2_init_variables() {
debug-print-function ${FUNCNAME} "$@"
- local x
+ local esc_pn liverepo livebranch livecommit
+ esc_pn=${PN//[-+]/_}
: ${EGIT_SOURCEDIR="${S}"}
@@ -139,19 +140,19 @@
: ${EGIT_MASTER:=master}
- eval x="\$${PN//[-+]/_}_LIVE_REPO"
- EGIT_REPO_URI=${x:-${EGIT_REPO_URI}}
+ liverepo=${esc_pn}_LIVE_REPO
+ EGIT_REPO_URI=${!liverepo:-${EGIT_REPO_URI}}
[[ -z ${EGIT_REPO_URI} ]] && die "EGIT_REPO_URI must have some value"
: ${EVCS_OFFLINE:=}
- eval x="\$${PN//[-+]/_}_LIVE_BRANCH"
- [[ -n ${x} ]] && ewarn "QA: using \"${PN//[-+]/_}_LIVE_BRANCH\" variable, you won't get any support"
- EGIT_BRANCH=${x:-${EGIT_BRANCH:-${EGIT_MASTER}}}
-
- eval x="\$${PN//[-+]/_}_LIVE_COMMIT"
- [[ -n ${x} ]] && ewarn "QA: using \"${PN//[-+]/_}_LIVE_COMMIT\" variable, you won't get any support"
- EGIT_COMMIT=${x:-${EGIT_COMMIT:-${EGIT_BRANCH}}}
+ livebranch=${esc_pn}_LIVE_BRANCH
+ [[ -n ${!livebranch} ]] && ewarn "QA: using \"${esc_pn}_LIVE_BRANCH\" variable, you won't get any support"
+ EGIT_BRANCH=${!livebranch:-${EGIT_BRANCH:-${EGIT_MASTER}}}
+
+ livecommit=${esc_pn}_LIVE_COMMIT
+ [[ -n ${!livecommit} ]] && ewarn "QA: using \"${esc_pn}_LIVE_COMMIT\" variable, you won't get any support"
+ EGIT_COMMIT=${!livecommit:-${EGIT_COMMIT:-${EGIT_BRANCH}}}
: ${EGIT_REPACK:=}
next reply other threads:[~2011-09-23 13:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 13:55 Michal Gorny (mgorny) [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-09-23 14:10 [gentoo-commits] gentoo-x86 commit in eclass: git-2.eclass Michal Gorny (mgorny)
2011-09-23 13:59 Michal Gorny (mgorny)
2011-09-23 13:58 Michal Gorny (mgorny)
2011-09-23 13:58 Michal Gorny (mgorny)
2011-09-23 13:58 Michal Gorny (mgorny)
2011-09-23 13:58 Michal Gorny (mgorny)
2011-09-23 13:57 Michal Gorny (mgorny)
2011-09-23 13:57 Michal Gorny (mgorny)
2011-09-23 13:57 Michal Gorny (mgorny)
2011-09-23 13:57 Michal Gorny (mgorny)
2011-09-23 13:56 Michal Gorny (mgorny)
2011-07-30 15:10 Tomas Chvatal (scarabeus)
2011-07-16 13:11 Michal Gorny (mgorny)
2011-06-08 15:18 Donnie Berkholz (dberkholz)
2011-05-20 15:53 Tomas Chvatal (scarabeus)
2011-05-20 15:32 Tomas Chvatal (scarabeus)
2011-05-20 14:35 Tomas Chvatal (scarabeus)
2011-05-02 21:15 Michal Gorny (mgorny)
2011-04-24 15:33 Tomas Chvatal (scarabeus)
2011-04-23 10:21 Tomas Chvatal (scarabeus)
2011-04-20 21:51 Tomas Chvatal (scarabeus)
2011-04-20 10:56 Tomas Chvatal (scarabeus)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110923135547.6FF9D20035@flycatcher.gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox