Gentoo Archives: gentoo-dev

From: Ryan Hill <dirtyepic@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: controlling src_test
Date: Thu, 04 Oct 2007 21:52:02
Message-Id: fe3l6i$rqd$1@sea.gmane.org
In Reply to: Re: [gentoo-dev] Re: controlling src_test by "Alin Năstac"
1 Alin Năstac wrote:
2 > Ryan Hill wrote:
3 >> NEWFEATURES=
4 >>
5 >> for f in ${FEATURES}; do
6 >> if [[ ! $f == "test" ]]; then
7 >> NEWFEATURES="${NEWFEATURES} $f"
8 >> fi
9 >> done
10 >>
11 >> FEATURES="${NEWFEATURES}"
12 >>
13 >>
14 > There is a simpler way to remove a word from an environment variable:
15 > FEATURES=" ${FEATURES}" # make sure every word is prefixed by a space
16 > FEATURES=${FEATURES/ test/}
17
18 Doh. I tried ${FEATURES## test} but didn't think of substitution.
19
20 This actually solves another problem for me. Thanks.
21
22 --
23 fonts / wxWindows / gcc-porting / treecleaners
24 EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662 (0xF9A40662)
25
26 --
27 gentoo-dev@g.o mailing list