Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-config:master commit in: /, tests/source/
Date: Mon, 31 Dec 2012 01:23:09
Message-Id: 1356917047.52b07404535c1f49942442c891f98fd3f3810daa.vapier@gentoo
1 commit: 52b07404535c1f49942442c891f98fd3f3810daa
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 31 01:20:36 2012 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 31 01:24:07 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gcc-config.git;a=commit;h=52b07404
7
8 gcc-config: use ${SED} everywhere
9
10 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
11
12 ---
13 gcc-config | 2 +-
14 tests/source/test.sed | 3 +++
15 2 files changed, 4 insertions(+), 1 deletions(-)
16
17 diff --git a/gcc-config b/gcc-config
18 index 61e3d1c..a9128d5 100755
19 --- a/gcc-config
20 +++ b/gcc-config
21 @@ -460,7 +460,7 @@ switch_profile() {
22 echo ""
23 if [[ ! -d /etc/ld.so.conf.d ]] ; then
24 show_var LDPATH "${ROOT}"/etc/env.d/05gcc-${CTARGET} \
25 - | sed -e 's|:|\n|g' >> /etc/ld.so.conf
26 + | ${SED} -e 's|:|\n|g' >> /etc/ld.so.conf
27 fi
28 ldconfig
29 fi
30
31 diff --git a/tests/source/test.sed b/tests/source/test.sed
32 new file mode 100644
33 index 0000000..4f439bc
34 --- /dev/null
35 +++ b/tests/source/test.sed
36 @@ -0,0 +1,3 @@
37 +#!/bin/bash
38 +# Make sure gcc-config does not run `sed` directly -- use ${SED}.
39 +grep '\<sed\>' "${GCC_CONFIG}" | grep -v '^: .*SED.*type -P sed' || :
40
41 diff --git a/tests/source/test.sed.exp b/tests/source/test.sed.exp
42 new file mode 100644
43 index 0000000..e69de29