Re: [PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Eric Blake
On Wed, Jul 20, 2022 at 06:32:22PM +0100, Peter Maydell wrote: > > > +# backslash escape any '\' and '"' characters > > > +printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g' > > > > You've fixed the bashism, but at the expense of a non-POSIX use of > > sed. POSIX says the input to sed must be a

Re: [PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Peter Maydell
On Wed, 20 Jul 2022 at 17:30, Eric Blake wrote: > > On Wed, Jul 20, 2022 at 04:26:29PM +0100, Peter Maydell wrote: > > The variable string-replacement syntax ${var/old/new} is a bashism > > (though it is also supported by some other shells), and for instance > > does not work with the NetBSD /bin/

Re: [PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Eric Blake
On Wed, Jul 20, 2022 at 04:26:29PM +0100, Peter Maydell wrote: > The variable string-replacement syntax ${var/old/new} is a bashism > (though it is also supported by some other shells), and for instance > does not work with the NetBSD /bin/sh, which complains: > ../src/configure: 687: Syntax error

Re: [PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Thomas Huth
On 20/07/2022 17.26, Peter Maydell wrote: The variable string-replacement syntax ${var/old/new} is a bashism (though it is also supported by some other shells), and for instance does not work with the NetBSD /bin/sh, which complains: ../src/configure: 687: Syntax error: Bad substitution Replac

[PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Peter Maydell
The variable string-replacement syntax ${var/old/new} is a bashism (though it is also supported by some other shells), and for instance does not work with the NetBSD /bin/sh, which complains: ../src/configure: 687: Syntax error: Bad substitution Replace it with a more portable sed-based approach,