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: Bruno Haible
Subject: Re: [PATCH] bootstrap: avoid broken Solaris sed
Date: Sun, 14 Nov 2010 00:40:30 +0100
User-agent: KMail/1.9.9

Eric Blake wrote:
> -package=`sed -n "$extract_package_name" configure.ac` || exit
> +package=`$SED -n "$extract_package_name" configure.ac` || exit

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.

Bruno



reply via email to

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