diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-15 08:55:09 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-15 09:09:10 -0500 |
commit | 0d06dbbeddf7f21e46fc072c3024be5f44b69bea (patch) | |
tree | 4b778a493e997b2c3333bd9f6a7faca5831646ea /app-shells | |
parent | app-shells/rc: update libedit configure flag #571808 (diff) | |
download | gentoo-0d06dbbeddf7f21e46fc072c3024be5f44b69bea.tar.gz gentoo-0d06dbbeddf7f21e46fc072c3024be5f44b69bea.tar.bz2 gentoo-0d06dbbeddf7f21e46fc072c3024be5f44b69bea.zip |
app-shells/rc: only update /etc/shells when needed
Diffstat (limited to 'app-shells')
-rw-r--r-- | app-shells/rc/rc-1.7.4.ebuild | 9 |
1 files 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 551f043253b4..22f4fd6d0699 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 } |