]> git.sesse.net Git - ffmpeg/commitdiff
configure: Replace `pr` since it is not provided by busybox
authorKylie McClain <somasis@exherbo.org>
Mon, 23 Nov 2015 19:06:50 +0000 (14:06 -0500)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 2 Dec 2015 22:49:10 +0000 (23:49 +0100)
While pr is a valid POSIX.1 command, its usage in configure
is a little borderline and is possible to replace it with
printf.

Bug-Id: 913

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
configure

index 6ec7586f828b404464f5b47d0e0b1a68c72c83f5..615a648fcac5a1ddac82d900f1bc0f12cad93efa 100755 (executable)
--- 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
+        printf '%5s   %s\n' "${i}" "${line}"
+        i=$(($i+1))
+    done < $1 >> $logfile
     log END $1
 }
 
@@ -2535,7 +2539,7 @@ die_unknown(){
 }
 
 print_3_columns() {
-    cat | tr ' ' '\n' | sort | pr -r -3 -t
+    printf "%-25s %-25s %-25s\n" $(cat | tr ' ' '\n' | sort)
 }
 
 show_list() {