On 02/12/15 13:47, Luca Barbato wrote:
> On 02/12/15 12:33, Diego Biurrun wrote:
>> On Thu, Nov 26, 2015 at 11:41:26AM +0100, Luca Barbato wrote:
>>> From: Kylie McClain <soma...@exherbo.org>
>>>
>>> While pr is a valid POSIX.1 command, its usage in configure
>>> is a little borderline and is possible to replace it with
>>> printf.
>>>
>>> ---
>>>
>>> The time spent by configure is pretty much the same or less, much less
>>> in busybox mode, obviously.
>>>
>>> --- a/configure
>>> +++ b/configure
>>> @@ -343,7 +343,11 @@ log(){
>>>
>>>  log_file(){
>>>      log BEGIN $1
>>> -    pr -n -t $1 >> $logfile
>>> +    i=1
>>> +    while read line;do
>>
>> At least add a space after ;.
> 
> done.
> 
>>> +        printf '%5s   %s\n' "${i}" "${line}"
>>> +        i=$(($i+1))
>>> +    done < $1 >> $logfile
>>>      log END $1
>>>  }
>>
>> The nl utility could do the job as well.
> 
> I'm afraid that is not part of busybox, the whole exercise is to drop
> something external to use a builtin.
> 
>>
>>> @@ -2535,7 +2539,7 @@ die_unknown(){
>>>
>>>  print_3_columns() {
>>> -    cat | tr ' ' '\n' | sort | pr -r -3 -t
>>> +    printf "%-20s %-20s %-20s\n" $(cat | tr ' ' '\n' | sort)
>>>  }
>>
>> 20 seems pretty arbitrary and too low a value.
> 
> What about 26 then ?

25 gets something that looks nicer than pr.

lu

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to