public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/rc/
Date: Fri, 15 Jan 2016 14:10:08 +0000 (UTC)	[thread overview]
Message-ID: <1452866950.0d06dbbeddf7f21e46fc072c3024be5f44b69bea.vapier@gentoo> (raw)

commit:     0d06dbbeddf7f21e46fc072c3024be5f44b69bea
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 15 13:55:09 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Jan 15 14:09:10 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d06dbbe

app-shells/rc: only update /etc/shells when needed

 app-shells/rc/rc-1.7.4.ebuild | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/app-shells/rc/rc-1.7.4.ebuild b/app-shells/rc/rc-1.7.4.ebuild
index 551f043..22f4fd6 100644
--- a/app-shells/rc/rc-1.7.4.ebuild
+++ b/app-shells/rc/rc-1.7.4.ebuild
@@ -35,8 +35,9 @@ src_install() {
 }
 
 pkg_postinst() {
-	ebegin "Updating /etc/shells"
-	( grep -v "^/bin/rcsh$" "${ROOT}"etc/shells; echo "/bin/rcsh" ) > "${T}"/shells
-	mv -f "${T}"/shells "${ROOT}"etc/shells
-	eend $?
+	if ! grep -q '^/bin/rcsh$' "${EROOT}"/etc/shells ; then
+		ebegin "Updating /etc/shells"
+		echo "/bin/rcsh" >> "${EROOT}"/etc/shells
+		eend $?
+	fi
 }


             reply	other threads:[~2016-01-15 14:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 14:10 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-27  0:58 [gentoo-commits] repo/gentoo:master commit in: app-shells/rc/ Sam James
2022-02-27  0:58 Sam James
2022-02-27  0:58 Sam James
2021-06-16 18:11 Lars Wendler
2019-05-29 18:07 Andreas Sturmlechner
2017-02-23 23:03 Patrice Clement
2017-02-23 23:03 Patrice Clement
2016-01-15 14:10 Mike Frysinger
2015-10-15 20:51 Patrice Clement
2015-10-15 20:51 Patrice Clement

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=1452866950.0d06dbbeddf7f21e46fc072c3024be5f44b69bea.vapier@gentoo \
    --to=vapier@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