Re: Troubles in a multiple choice

Benjamin Schieder <[email protected]> Tue, 14 Nov 2006 18:47:27 +0100
Newsgroups gmane.linux.distributions.rock.devel
Message-ID <[email protected]>
--===============0779551708==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99"
Content-Disposition: inline


--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 14.11.2006 18:23:00, Luca wrote:
> Hi and good evening to all!
>=20
> I'm having a trouble with a multiple choice:
>=20
> I've added, taking looks at various files, some lines of code like these:
>=20
> comment 'Choose your timezone'
>     choice ROCKCFG_PKG_GLIBC_TIMEZONE `(grep "$1/"
> /usr/share/zoneinfo/zone.tab | cut -f3 | sort -u | tr '\n' ' ')
>=20
> 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...)
>=20
> 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
--=20
  ____  _        _    ____  _   _ _ _____ __  __=20
 / ___|| |      / \  / ___|| | | ( ) ____|  \/  |
 \___ \| |     / _ \ \___ \| |_| |/|  _| | |\/| |
  ___) | |___ / ___ \ ___) |  _  | | |___| |  | |
 |____/|_____/_/   \_\____/|_| |_| |_____|_|  |_|
 play online: telnet://slashem.crash-override.net
 view scores: http://slashem.crash-override.net
 watch deaths: irc://irc.freenode.net#slashem

--5vNYLRcllDrimb99
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFWgEvAsME5O4xgqgRAoUtAKCXMHnW9pVY/4O8kZeNcYEs6DurnACdH4C4
iynrGVzx58k0oJpyFCR8yjg=
=0X/0
-----END PGP SIGNATURE-----

--5vNYLRcllDrimb99--

--===============0779551708==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
rock-devel mailing list
[email protected]
http://www.rocklinux.net/mailman/listinfo/rock-devel

--===============0779551708==--