Commit 49036c7e authored by Vincent Pelletier's avatar Vincent Pelletier

shell: Escape literal end bracket in "case" patterns.

parent d6fd5a40
......@@ -778,7 +778,7 @@ EOF
ca_port=80
# Note: too bad there is no portable case fall-through...
case "$ca_netloc" in
*]:*)
*\]:*)
# Bracket-enclosed address, which may contain colons
ca_address="$(
printf "%s\\n" "$ca_netloc" | sed "s!^\\(.*\\]\\).*!\\1!"
......@@ -787,7 +787,7 @@ EOF
printf "%s\\n" "$ca_netloc" | sed "s!^[^\\]]*\\]:!!"
)"
;;
*]*)
*\]*)
# Bracket-enclosed address, which may contain colons
ca_address="$(
printf "%s\\n" "$ca_netloc" | sed "s!^\\(.*\\]\\).*!\\1!"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment