mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
makepkg: avoid nested quoting in string replacement
I suspect this is just wrong -- you never need to quote the replacement side of a PE. In bash 4.3, this is essentially a no-op, but because of a bug in bash 4.2, we get embedded quotes as a result of this replacement. The relevant changelog item in bash is: Fixed a bug that caused single quotes that resulted from $'...' quoting in the replacement portion of a double-quoted ${word/pat/rep} expansion to be treated as quote characters. But this doesn't apply to us. Let's just drop the excessive quoting... Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
9e5e86aa14
commit
83d5512bf1
@ -362,11 +362,11 @@ download_file() {
|
||||
# replace %o by the temporary dlfile if it exists
|
||||
if [[ ${cmdline[*]} = *%o* ]]; then
|
||||
dlfile=$filename.part
|
||||
cmdline=("${cmdline[@]//%o/"$dlfile"}")
|
||||
cmdline=("${cmdline[@]//%o/$dlfile}")
|
||||
fi
|
||||
# add the URL, either in place of %u or at the end
|
||||
if [[ ${cmdline[*]} = *%u* ]]; then
|
||||
cmdline=("${cmdline[@]//%u/"$url"}")
|
||||
cmdline=("${cmdline[@]//%u/$url}")
|
||||
else
|
||||
cmdline+=("$url")
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user