8035904: Solaris fastdebug builds are failing

Reviewed-by: tbell
This commit is contained in:
Erik Joelsson 2014-02-28 13:35:32 +01:00
parent 7fc4ffd40b
commit a6354ef8f2

@ -127,10 +127,11 @@ function shell_quote() {
if [[ -n "$1" ]]; then
# Uses only shell-safe characters? No quoting needed.
# '=' is a zsh meta-character, but only in word-initial position.
if [[ "$1" =~ ^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.:,%/+=_-]+$ && ! "$1" =~ ^= ]]; then
if echo "$1" | grep -qE '^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.:,%/+=_-]+$' \
&& ! echo "$1" | grep -qE '^='; then
quoted="$1"
else
if [[ "$1" =~ [\'!] ]]; then
if echo "$1" | grep -qE "[\'!]"; then
# csh does history expansion within single quotes, but not
# when backslash-escaped!
local quoted_quote="'\\''" quoted_exclam="'\\!'"