1 |
Hi! |
2 |
|
3 |
В Вск, 03/10/2010 в 13:41 +0200, Ole Markus With пишет: |
4 |
> for slot in `php_get_slots`; do |
5 |
|
6 |
It's better use $() instead of backticks: |
7 |
http://mywiki.wooledge.org/BashFAQ/082 |
8 |
|
9 |
> [[ -z "${PHP_EXT_ZENDEXT}" ]] && PHP_EXT_ZENDEXT="no" |
10 |
> |
11 |
... |
12 |
> [[ -z "$USE_PHP" ]] && USE_PHP="php5-2 php5-3" |
13 |
|
14 |
In some places eclass uses ${var} syntax but here and later it uses |
15 |
$var. I'm not sure which syntax is better but in Gentoo we use ${var} |
16 |
and for readability it's better to stick to single style. |
17 |
|
18 |
> php_get_slots() { |
19 |
> local s |
20 |
> local slot |
21 |
|
22 |
single $(local s slot) is enough here. |
23 |
|
24 |
> php_init_slot_env() { |
25 |
... |
26 |
> S="${WORKDIR}/$1" |
27 |
> cd $S |
28 |
|
29 |
S is unquoted, and ${} |
30 |
|
31 |
> php-ext-source-r2_buildinilist() { |
32 |
... |
33 |
> for x in ${PHPSAPILIST} ; do |
34 |
|
35 |
local x? |
36 |
|
37 |
-- |
38 |
Peter. |