[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Friendlier gnulib-tool error messages with multiple incompatible mod

From: Derek Price
Subject: Re: Friendlier gnulib-tool error messages with multiple incompatible modules
Date: Thu, 25 Sep 2008 16:10:43 -0400
User-agent: Thunderbird (Windows/20080708)

Bruno Haible wrote:

>> +func_wrap ()
>> +{
>> +  prefix=$2
>> +  plen=`echo "$prefix" |wc -c`
>> +  if test -z "$3"; then
>> +    len=80
>> +  fi
>> +  len=`expr $len - $plen`
>> +  echo "$1" |sed -e "s#.\\{1,$len\\} #&\\n$prefix#g" -e "s#^#$prefix&#"
>> +}
> This is an interesting use of 'sed'. Btw, I think it would be useful to have
> a library of shell script functions, not limited to those needed by autoconf.
> Is it possible to implement the entire 'fmt' in 'sed'?

Glancing over `info coreutils "fmt invocation"', I would say yes,
mostly.  --crown-margin would be challenging, but I think doable.  I'm
not sure what --tagged-paragraph is getting at, but if I understand the
documentation correctly, then its implementation should be similar to
--crown-margin.  Finally, I would probably leave out "[trying] to avoid
line breaks after the first word of a sentence or before the last word
of a sentence".

Otherwise, it looks like a workable idea.  Where would this library of
shell script functions reside?

> I've applied this. It yields tabular formatting:
> gnulib-tool: *** incompatible license on modules:
>                  areadlink-with-size                               GPL
>                  canonicalize                                      GPL
>                  chdir-long                                        GPL
>                  chown                                             GPL
>                  ...
>                  xstrndup                                          GPL
> gnulib-tool: *** Stop.
> 2008-09-25  Derek Price  <address@hidden>
>             Bruno Haible  <address@hidden>
>       * gnulib-tool (func_import): Report all license incompatibilities, not
>       just the first one.


Derek R. Price
Solutions Architect
Ximbiot, LLC <http://ximbiot.com>
Get CVS and Subversion Support from Ximbiot!

v: +1 248.835.1260
f: +1 248.246.1176

reply via email to

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