projects
/
gentoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be0c7f7
)
app-shells/rc: only update /etc/shells when needed
author
Mike Frysinger
<vapier@gentoo.org>
Fri, 15 Jan 2016 13:55:09 +0000
(08:55 -0500)
committer
Mike Frysinger
<vapier@gentoo.org>
Fri, 15 Jan 2016 14:09:10 +0000
(09:09 -0500)
app-shells/rc/rc-1.7.4.ebuild
patch
|
blob
|
history
diff --git
a/app-shells/rc/rc-1.7.4.ebuild
b/app-shells/rc/rc-1.7.4.ebuild
index 551f043253b4a7569a3b55b76abad7679ad70739..22f4fd6d069984481f36b1cdecbb4d90fcad4dfd 100644
(file)
--- 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
}