1 |
В Чтв, 13/12/2007 в 10:52 +0000, Steve Long пишет: |
2 |
> Peter Volkov wrote: |
3 |
> > Speaking about the |
4 |
> > latter it is: |
5 |
> > |
6 |
> > 1. Modify eclass to use arrays: |
7 |
> > |
8 |
> > for conffile in ${FONT_CONF[@]}; do |
9 |
> > ... |
10 |
> > done |
11 |
> > |
12 |
> > 2. Modify ebuilds to use arrays. |
13 |
> > |
14 |
> > -FONT_CONF="path1 path2" |
15 |
> > +FONT_CONF=( "path1" "path2" ) |
16 |
> > |
17 |
> > 3. Modify eclass, so that it works with path containing spaces inside: |
18 |
> > |
19 |
> > -for conffile in ${FONT_CONF[@]}; do |
20 |
> > +for conffile in "${FONT_CONF[@]}"; do |
21 |
|
22 |
> That looks right, although step 1 should *always* be to use the code from |
23 |
> step 3. |
24 |
|
25 |
No. The idea is to have after first step some kind of "backward |
26 |
compatibility". So while we have |
27 |
|
28 |
FONT_CONF="path1 path2" |
29 |
|
30 |
definitions in the tree, when I use them as array bash will expand |
31 |
${FONT_CONF[@]} in the same way as array with exactly 1 element. And I |
32 |
do not it to be qouted as for cycle should iterate through path{1,2}. I |
33 |
know this does not work with spaces, but current implementations has the |
34 |
same limitation. |
35 |
|
36 |
-- |
37 |
Peter. |