From 77a222d5094d902128d355685501c7b30c8cccca Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Sun, 20 Dec 2009 14:52:58 +0059 Subject: Pimp up the progress bar Signed-off-by: Thorsten Glaser --- package/depmaker | 6 ++++++ package/pkgmaker | 8 ++++++++ 2 files changed, 14 insertions(+) (limited to 'package') diff --git a/package/depmaker b/package/depmaker index 43d4327eb..edbacc6f1 100644 --- a/package/depmaker +++ b/package/depmaker @@ -5,9 +5,13 @@ if gmake --help >/dev/null 2>&1; then else export GMAKE=make fi +(( x_cols = (COLUMNS > 10) ? COLUMNS - 2 : 80 )) +typeset -L$x_cols pbar for dn in */Makefile; do dn=${dn%/*} + pbar="$dn ..." + print -nu2 "$pbar\r" case $dn { (@(?(e)g|uc|)libc|libpthread|uclibc++) ;; (*) @@ -27,3 +31,5 @@ for dn in */Makefile; do done print -r -- $x done >Depends.mk +pbar=done +print -u2 "$pbar" diff --git a/package/pkgmaker b/package/pkgmaker index a8a54c631..879c5eff4 100644 --- a/package/pkgmaker +++ b/package/pkgmaker @@ -5,6 +5,8 @@ if gmake --help >/dev/null 2>&1; then else export GMAKE=make fi +(( x_cols = (COLUMNS > 10) ? COLUMNS - 2 : 80 )) +typeset -L$x_cols pbar # build a cache of “ipkg package name” → “package conf option” for # use with dependency resolution @@ -12,6 +14,8 @@ rm -rf pkglist.d mkdir pkglist.d for dn in */Makefile; do dn=${dn%/*} + pbar="Pass 1: $dn ..." + print -nu2 "$pbar\r" cd $dn # ALL_PKGOPTS: all subpackage conf options @@ -35,6 +39,8 @@ done # build Config.in files and resolve dependencies for dn in */Makefile; do dn=${dn%/*} + pbar="Pass 2: $dn ..." + print -nu2 "$pbar\r" cd $dn # PKG_NAME: package name (directory, free-format) @@ -169,3 +175,5 @@ EOF ) >Config.in cd .. done +pbar=done +print -u2 "$pbar" -- cgit v1.2.3