1 |
>>>>> On Thu, 12 Jan 2012, Micha³ Górny wrote: |
2 |
|
3 |
> Maybe the eclass should now set PROPERTIES=interactive? |
4 |
|
5 |
Good idea. |
6 |
|
7 |
>> for f in "$@" ; do |
8 |
>> ((++cdcnt)) |
9 |
>> export CDROM_CHECK_${cdcnt}="$f" |
10 |
>> done |
11 |
>> export CDROM_TOTAL_CDS=${cdcnt} |
12 |
>> export CDROM_CURRENT_CD=1 |
13 |
|
14 |
> Why are you exporting all that? I don't think that should be |
15 |
> necessary unless you subshell somewhere. |
16 |
|
17 |
Indeed, looks like these exports could be removed. |
18 |
|
19 |
> CDROM_CHECK=( "${@}" ) |
20 |
> CDROM_TOTAL_CDS=${#} # (or ${#CDROM_CHECK[@]}) |
21 |
|
22 |
> And then you can just refer to ${CDROM_CHECK[$i]} rather than using |
23 |
> all those ugly ${!...}. |
24 |
|
25 |
I'm reluctant to make such intrusive changes. Maybe the code isn't |
26 |
elegant, but it's been in production use for years. So I'd rather not |
27 |
risk any breakage. |
28 |
|
29 |
>> einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}" |
30 |
|
31 |
> #1. You are using 1 in variable calls, I don't see a reason to use |
32 |
> longer ${CDROM_CURRENT_CD} in this one output case. |
33 |
|
34 |
That's just a stylistic change with no functional difference. |
35 |
|
36 |
> More when I get replies on these ones. |
37 |
|
38 |
Maybe really vapier should answer your questions. These functions are |
39 |
his code, I'm just splitting them out from eutils. |
40 |
|
41 |
Ulrich |