diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-11-03 13:56:31 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-11-03 14:37:41 +0100 |
commit | 3f64846d95f14140e78751b643eaac49a61b15df (patch) | |
tree | 489c9515c821f36ac50df80a384f8f3df4055e68 /scripts/lib/ptxd_make_world_common.sh | |
parent | 4723fb1a5d22df234b5c77c1086b7ac80d684c28 (diff) | |
download | ptxdist-3f64846d95f14140e78751b643eaac49a61b15df.tar.gz ptxdist-3f64846d95f14140e78751b643eaac49a61b15df.tar.xz |
[ptxdist] fix "local -a" + IFS problem
This patch fixes a problem with bash-3.0.x. This old bash versions
doesn't respect IFS when splitting a variable: This costruct doesn't
work:
foo="bar:baz"
local -a qux=( ${foo} )
echo "${foo[@]}"
it prints:
bar:baz
bash > 3.0.x prints
bar baz
The correct sequence is to first declare qux as a local array and then
assign it:
local -a qux
qux=( ${foo} )
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_world_common.sh')
-rw-r--r-- | scripts/lib/ptxd_make_world_common.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh index d44435b67..ef2adcc2b 100644 --- a/scripts/lib/ptxd_make_world_common.sh +++ b/scripts/lib/ptxd_make_world_common.sh @@ -12,7 +12,8 @@ # check for deprecated vars and print them # ptxd_make_world_init_deprecation_check() { - local -a dep=( + local -a dep + dep=( pkg_deprecated_install_builddir pkg_deprecated_install_hosttool pkg_deprecated_install_opt |