Gentoo Archives: gentoo-dev

From: Christian Faulhammer <fauli@g.o>
To: Gentoo Development <gentoo-dev@l.g.o>
Subject: [gentoo-dev] Re: RFC: mesa.eselect
Date: Mon, 01 Nov 2010 09:34:10
Message-Id: 20101101113636.63df85cd@gentoo.org
In Reply to: [gentoo-dev] RFC: mesa.eselect by "Chí-Thanh Christopher Nguyễn"
1 Hi,
2
3 Chí-Thanh Christopher Nguyễn <chithanh@g.o>:
4 > * Accept numbers as do_set() arguments
5
6 Taken from emacs.eselect
7
8 # target may be specified by its name or its index
9 if is_number "${target}"; then
10 # numeric index, find the target's name
11 targets=( $(find_targets) )
12 [[ ${target} -ge 1 && ${target} -le ${#targets[@]} ]] \
13 || die -q "Number out of range: ${1}"
14 target=${targets[target-1]}
15 fi
16
17 I would love to have more comments to explain in general and
18 specifically for the structure of MESA_DRIVERS. The rest of the review
19 is mostly a matter of style.
20
21 > CONFIG_DIR="${EROOT}/usr/share/mesa"
22
23 Maybe something less generic as variable name? Also the local x, y, z
24 variables could be named a bit more obvious.
25
26 > for y in classic gallium; do
27 > z=$(get_drivername ${family} ${y})
28 > [ -f ${MESA_DIR}/${z} -o -L ${MESA_DIR}/${z} ] &&
29 > ret+="${y} " done
30
31 I would welcome more if constructs instead of &&, as it makes the code
32 more readable.
33
34 V-Li
35
36 --
37 Christian Faulhammer, Gentoo Lisp project
38 <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
39
40 <URL:http://gentoo.faulhammer.org/>

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Re: RFC: mesa.eselect "Chí-Thanh Christopher Nguyễn" <chithanh@g.o>