Mercurial > hg > control-images
changeset 17:a90ac7ed5d64
Add X of Y progress indicator.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 30 Oct 2011 22:27:54 -0500 |
parents | 0bdce741ba83 |
children | 8b2a876d74a5 |
files | common/bootstrap/build-one-package.sh common/bootstrap/run-build-stages.sh |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/common/bootstrap/build-one-package.sh Sun Oct 30 17:58:45 2011 -0500 +++ b/common/bootstrap/build-one-package.sh Sun Oct 30 22:27:54 2011 -0500 @@ -8,7 +8,7 @@ # build $1 -set_titlebar "$1" +set_titlebar "$1$X_OF_Y" # Three types of /mnt/build scripts: #
--- a/common/bootstrap/run-build-stages.sh Sun Oct 30 17:58:45 2011 -0500 +++ b/common/bootstrap/run-build-stages.sh Sun Oct 30 22:27:54 2011 -0500 @@ -6,14 +6,18 @@ touch "$MANIFEST" [ -z "$FILTER" ] || FILTER="/$FILTER/d" -for i in $(sed -r -e "$FILTER" -e "s@#.*@@" /mnt/package-list) +PACKAGES="$(sed -r -e "$FILTER" -e "s@#.*@@" /mnt/package-list)" +PACKAGECOUNT=$(echo "$PACKAGES" | wc -w) +X=0 +for i in $PACKAGES do + X=$(($X+1)) if [ -z "$FORCE" ] && grep -q "$i" "$MANIFEST" then echo "$i already installed" continue fi - /mnt/build-one-package.sh "$i" || exit 1 + X_OF_Y="($X of $PACKAGECOUNT)" /mnt/build-one-package.sh "$i" || exit 1 sed -i -e "/$i/d" "$MANIFEST" && echo "$i" >> "$MANIFEST" || exit 1