Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:pending commit in: targets/stage1/
Date: Tue, 02 Sep 2014 02:43:47
Message-Id: 1409622060.713fbfe3b9d49579ea46fc5c33249bdb6ece53b4.dol-sen@gentoo
1 commit: 713fbfe3b9d49579ea46fc5c33249bdb6ece53b4
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 26 01:31:00 2014 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Tue Sep 2 01:41:00 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=713fbfe3
7
8 stage1-controller.sh: Fix portage bin path hard coding
9
10 Also rework to use find's filters instead of piping several times through grep.
11 Code supplied by: Douglas Freed <dwfreed>
12
13 ---
14 targets/stage1/stage1-controller.sh | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17 diff --git a/targets/stage1/stage1-controller.sh b/targets/stage1/stage1-controller.sh
18 index 8dbd16b..1b2eee2 100755
19 --- a/targets/stage1/stage1-controller.sh
20 +++ b/targets/stage1/stage1-controller.sh
21 @@ -33,9 +33,9 @@ case $1 in
22 find . -iname "*.py[co]" -exec rm -f {} \;
23 # Cleanup all .a files except libgcc.a, *_nonshared.a and
24 # /usr/lib/portage/bin/*.a
25 - find . -type f -iname "*.a" | grep -v 'libgcc.a' | \
26 - grep -v 'nonshared.a' | grep -v '/usr/lib/portage/bin/' | \
27 - grep -v 'libgcc_eh.a' | xargs rm -f
28 + find . -path usr/lib/portage -prune -o -type f \
29 + -iname '*.a' ! -name 'libgcc.a' ! -name '*nonshared.a' \
30 + ! -name 'libgcc_eh.a' -print | xargs rm -f
31 ;;
32
33 *)