# HG changeset patch # User Rob Landley # Date 1320031674 18000 # Node ID a90ac7ed5d64d8287ed919d54d1302abab3a36ac # Parent 0bdce741ba832a242d8f906fbf536d918ff69a4a Add X of Y progress indicator. diff -r 0bdce741ba83 -r a90ac7ed5d64 common/bootstrap/build-one-package.sh --- 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: # diff -r 0bdce741ba83 -r a90ac7ed5d64 common/bootstrap/run-build-stages.sh --- 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