diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-11-28 17:18:47 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-11-29 10:24:19 +0100 |
commit | f2db1dc4ecb743a63a26a767de4edb193e3d5bb9 (patch) | |
tree | 005b5c46a231b83dc6895c81a7464e5cce1da6e1 /scripts/lib/ptxd_make_world_license.sh | |
parent | 7770b27146e19f3bc420dfa2146b78fd3d0c2c5c (diff) | |
download | ptxdist-f2db1dc4ecb743a63a26a767de4edb193e3d5bb9.tar.gz ptxdist-f2db1dc4ecb743a63a26a767de4edb193e3d5bb9.tar.xz |
ptxd_make_world_license: fix for bash >= 4.2
In bash >= 4.2 escaping '{' and '}' works differently. As a result, the
output is not the same (extra '\'). Use temporary variables to handle old
and new bash versions correctly.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_world_license.sh')
-rw-r--r-- | scripts/lib/ptxd_make_world_license.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/ptxd_make_world_license.sh b/scripts/lib/ptxd_make_world_license.sh index b878e72ef..c82a724be 100644 --- a/scripts/lib/ptxd_make_world_license.sh +++ b/scripts/lib/ptxd_make_world_license.sh @@ -127,17 +127,18 @@ export -f ptxd_make_latex_escape # ptxd_make_world_license_write() { local guess + local brl='{' brr='}' local pkg_chapter="$(ptxd_make_latex_escape ${pkg_label})" local packages_url="${pkg_url}" local packages_md5="${pkg_md5}" local -a flags=( "${!pkg_license_flags[@]}" ) local -a index=( "${!pkg_license_flags[@]}" ) - flags=( "${flags[@]/#/\\nameref\{}" ) - flags=( "${flags[@]/%/\}}" ) + flags=( "${flags[@]/#/\\nameref${brl}}" ) + flags=( "${flags[@]/%/${brr}}" ) pkg_chapter="${pkg_chapter#host-}" pkg_chapter="${pkg_chapter#cross-}" index=( "${index[@]/#/\\index[}" ) - index=( "${index[@]/%/]\{${pkg_chapter}\}}" ) + index=( "${index[@]/%/]${brl}${pkg_chapter}${brr}}" ) case "${pkg_license}" in *proprietary*) |