Re: Troubles in a multiple choice

Luca <[email protected]> Tue, 14 Nov 2006 19:08:56 +0100
Newsgroups gmane.linux.distributions.rock.devel
Message-ID <[email protected]>
Benjamin Schieder wrote:
> On 14.11.2006 18:23:00, Luca wrote:
>   
>> Hi and good evening to all!
>>
>> I'm having a trouble with a multiple choice:
>>
>> I've added, taking looks at various files, some lines of code like these:
>>
>> comment 'Choose your timezone'
>>     choice ROCKCFG_PKG_GLIBC_TIMEZONE `(grep "$1/"
>> /usr/share/zoneinfo/zone.tab | cut -f3 | sort -u | tr '\n' ' ')
>>
>> but it puts an entry in a text box and on the same line it adds an extra
>> entry like an "echo <text>" and scrolling the choice list various
>> entries are missing... (exactly it puts the first entry of the list like
>> the "echo <text>" and the second in the text box...)
>>
>> How someone could solve my little problem... (probably silly but I'm
>> trying to manage it from an hour...)
>>     
>
> choice has the following syntax:
>
> choice VARIABLENAME DEFAULTVALUE \
> 	       value_1	description_1 \
> 	       value_2	description_2 \
> 	       ...
> 	       value_n	description_n
>
> I guess that ever other entry is missing in your list this way.
> So, what you want is probably something like this:
>
> choice ROCKCFG_PKG_GLIBC_TIMEZONE Europe/Berlin \
> 	       `grep "$1/" /usr/share/zoneinfo/zone.tab | while read a b timezone c ; do echo "$b $b" ; done`
>
>
> Greetings,
> 	Benjamin
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> rock-devel mailing list
> [email protected]
> http://www.rocklinux.net/mailman/listinfo/rock-devel
>   
Hi Benjmin,

Thanks a lot it solved my problem, however now I'm trying to manage to
have the list in alphabetical order.

Luca