Gentoo Archives: gentoo-dev

From: Patrice Clement <monsieurp@g.o>
To: gentoo-dev@l.g.o
Cc: vim@g.o
Subject: [gentoo-dev] [PATCH 3/3] vim-plugin.eclass: rework if else clause and reduce find calls down to one.
Date: Sat, 04 Nov 2017 21:50:21
Message-Id: 20171104214844.22218-4-monsieurp@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/3] vim-plugin.eclass: improvements. by Patrice Clement
1 ---
2 eclass/vim-plugin.eclass | 6 +++---
3 1 file changed, 3 insertions(+), 3 deletions(-)
4
5 diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
6 index 3c809768cf8..d635a2aa436 100644
7 --- a/eclass/vim-plugin.eclass
8 +++ b/eclass/vim-plugin.eclass
9 @@ -40,11 +40,11 @@ vim-plugin_src_install() {
10 # Make sure perms are good
11 chmod -R a+rX "${S}" || die "chmod failed"
12 find "${S}" -user "${PORTAGE_USERNAME}" -exec chown root '{}' \; || die "chown failed"
13 + local _grp="root"
14 if use userland_BSD || [[ ${CHOST} == *-darwin* ]] ; then
15 - find "${S}" -group "${PORTAGE_GRPNAME}" -exec chgrp wheel '{}' \; || die "chgrp failed"
16 - else
17 - find "${S}" -group "${PORTAGE_GRPNAME}" -exec chgrp root '{}' \; || die "chgrp failed"
18 + _grp="wheel"
19 fi
20 + find "${S}" -group "${PORTAGE_GRPNAME}" -exec chgrp "${_grp}" '{}' \; || die "chgrp failed"
21 eend $?
22 fi
23
24 --
25 2.13.6