Gentoo Archives: gentoo-dev

From: Roy Marples <uberlord@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in x11-libs/qt: ChangeLog qt-4.3.2.ebuild
Date: Thu, 04 Oct 2007 10:25:01
Message-Id: 1191492700.1099.2.camel@uberlaptop.development.ltl
In Reply to: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in x11-libs/qt: ChangeLog qt-4.3.2.ebuild by "Marijn Schouten (hkBst)"
1 On Thu, 2007-10-04 at 11:53 +0200, Marijn Schouten (hkBst) wrote:
2 > > See, another use of bash arrays just because you can?
3 > > IFS=-
4 > > set -- ${CHOST}
5 > > spec=$2
6 > >
7 > > Works fine in bash - and other shells.
8 >
9 > Do I understand correctly that this resets any arguments that might have been
10 > passed to the function this happens to be in?
11
12 Yes it does.
13
14 Most people write their functions like so
15
16 foo() {
17 local this=$1 that=$2
18
19 And then use $this and $that for greater clarity. So if they do that
20 then resetting the positional parameters is a non issue as they've
21 already been saved.
22
23 Thanks
24
25 Roy
26
27 --
28 gentoo-dev@g.o mailing list