From 9c94cd8a2f13ab5cca271b01ed56186bc07c8ee1 Mon Sep 17 00:00:00 2001
From: Kylie McClain <somasis@exherbo.org>
Date: Wed, 29 Jun 2016 16:37:20 -0400
Subject: [PATCH] configure: Replace `pr` since it is not provided by busybox
This patch replaces the usgae of `pr` in log_file() with printf;
`pr` is a POSIX.1 command, but it's a little obscure, and busybox
doesn't provide it, and it's easily replaceable.
---
configure | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 007c953..b6e450e 100755
|
a
|
b
|
log(){
|
| 468 | 468 | |
| 469 | 469 | log_file(){ |
| 470 | 470 | log BEGIN $1 |
| 471 | | pr -n -t $1 >> $logfile |
| | 471 | i=1 |
| | 472 | while read line;do |
| | 473 | printf '%5s %s\n' "${i}" "${line}" |
| | 474 | i=$(($i+1)) |
| | 475 | done < $1 >> $logfile |
| 472 | 476 | log END $1 |
| 473 | 477 | } |
| 474 | 478 | |
| … |
… |
die_unknown(){
|
| 3321 | 3325 | |
| 3322 | 3326 | print_in_columns() { |
| 3323 | 3327 | cols=$(expr $ncols / 24) |
| 3324 | | cat | tr ' ' '\n' | sort | pr -r "-$cols" -w $ncols -t |
| | 3328 | printf=$(seq 1 $cols) |
| | 3329 | printf=$(for c in $printf;do printf '%s' '%-5s'; [ $c -eq $cols ] && printf '\n' || printf ' ';done) |
| | 3330 | printf "$printf" $(cat | tr ' ' '\n' | sort) |
| 3325 | 3331 | } |
| 3326 | 3332 | |
| 3327 | 3333 | show_list() { |