bug-gnulib
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]