summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-11-28 17:18:47 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-11-29 10:24:19 +0100
commitf2db1dc4ecb743a63a26a767de4edb193e3d5bb9 (patch)
tree005b5c46a231b83dc6895c81a7464e5cce1da6e1 /scripts
parent7770b27146e19f3bc420dfa2146b78fd3d0c2c5c (diff)
downloadptxdist-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')
-rw-r--r--scripts/lib/ptxd_make_world_license.sh7
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*)