1 |
At Tue, 19 Aug 2003 04:43:50 +0200, |
2 |
Spider wrote: |
3 |
> |
4 |
> [1 <text/plain; US-ASCII (7bit)>] |
5 |
> begin quote |
6 |
> On Mon, 18 Aug 2003 22:31:47 -0400 |
7 |
> Owen Gunden <ogunden@××××××××××××.edu> wrote: |
8 |
> |
9 |
> > So hypothetically, if I wanted to write a shell script that behaved |
10 |
> > differently if virtual/mta was installed than if it was not, what |
11 |
> > would I do? |
12 |
|
13 |
> cat /var/cache/edb/virtuals ... this should give you the format |
14 |
> enough to work shell magic with it :) |
15 |
|
16 |
Alternatively, you can use has_version function. If you want to use |
17 |
it from normal shell script (not an ebuild), use |
18 |
|
19 |
/usr/bin/portageq has_version / 'virtual/mta' && ... |
20 |
|
21 |
See man 5 ebuild for more detail. |
22 |
|
23 |
-- |
24 |
Mamoru KOMACHI <usata@g.o> |
25 |
http://dev.gentoo.org/~usata/ |
26 |
|
27 |
-- |
28 |
gentoo-dev@g.o mailing list |