>>>>> On Thu, 12 Jan 2012, Michał Górny wrote:
> Maybe the eclass should now set PROPERTIES=interactive?
Good idea.
>> for f in "$@" ; do
>> ((++cdcnt))
>> export CDROM_CHECK_${cdcnt}="$f"
>> done
>> export CDROM_TOTAL_CDS=${cdcnt}
>> export CDROM_CURRENT_CD=1
> Why are you exporting all that? I don't think that should be
> necessary unless you subshell somewhere.
Indeed, looks like these exports could be removed.
> CDROM_CHECK=( "${@}" )
> CDROM_TOTAL_CDS=${#} # (or ${#CDROM_CHECK[@]})
> And then you can just refer to ${CDROM_CHECK[$i]} rather than using
> all those ugly ${!...}.
I'm reluctant to make such intrusive changes. Maybe the code isn't
elegant, but it's been in production use for years. So I'd rather not
risk any breakage.
>> einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}"
> #1. You are using 1 in variable calls, I don't see a reason to use
> longer ${CDROM_CURRENT_CD} in this one output case.
That's just a stylistic change with no functional difference.
> More when I get replies on these ones.
Maybe really vapier should answer your questions. These functions are
his code, I'm just splitting them out from eutils.
Ulrich