[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bootstrap: avoid broken Solaris sed
From: |
Eric Blake |
Subject: |
Re: [PATCH] bootstrap: avoid broken Solaris sed |
Date: |
Sat, 13 Nov 2010 16:49:44 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6 |
On 11/13/2010 04:40 PM, Bruno Haible wrote:
> Instead of changing every use of sed to $SED, why don't you define 'sed'
> as a function? Like this:
>
> if test "$SED" != sed; then
> sed ()
> {
> $SED "$@"
> }
> fi
>
> This will
> 1. follow the gnulib philosophy of separation of platform specific
> workarounds and the actual code that uses the workarounds,
> 2. reduce the danger that someone - not aware of of the limitations of sed -
> uses 'sed' instead of '$SED' in future modifications of the script.
By the way, you may want to do a similar fix for gnulib-tool, since a
quick search found at least one sed script that will fail with Solaris
/bin/sed:
# Update license.
sed_transform_main_lib_file=$sed_transform_main_lib_file'
s/GNU Lesser General/GNU General/g
s/GNU Library General/GNU General/g
s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Eric Blake, 2010/11/12
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Paul Eggert, 2010/11/12
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Eric Blake, 2010/11/12
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Ralf Wildenhues, 2010/11/13
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Eric Blake, 2010/11/13
- [PATCH] bootstrap: avoid broken Solaris sed, Eric Blake, 2010/11/13
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Bruno Haible, 2010/11/13
- [PATCHv2] bootstrap: avoid broken Solaris sed, Eric Blake, 2010/11/13
- Re: [PATCH] bootstrap: avoid broken Solaris sed,
Eric Blake <=
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Paul Eggert, 2010/11/13
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Bruno Haible, 2010/11/13
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Paul Eggert, 2010/11/14
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Eric Blake, 2010/11/15
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Paul Eggert, 2010/11/15