From e12c3b994c12284d971e962985edc5d872671ca9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 29 Jan 2013 14:20:38 -0500 Subject: prettify the output of pbs-absrepo-convert--filterarch --- pbs-absrepo-convert--filterarch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pbs-absrepo-convert--filterarch b/pbs-absrepo-convert--filterarch index 506baf3..73fa96a 100755 --- a/pbs-absrepo-convert--filterarch +++ b/pbs-absrepo-convert--filterarch @@ -1,6 +1,9 @@ #!/bin/bash -e arch=$1 +echo # newline +echo Preparing... + # generate map of all packages to their treehash tree="$(mktemp)" if [[ $arch = master ]]; then @@ -17,7 +20,10 @@ printf '%s\n' */repos/*-"$arch" | sed -r 's@^([^/]*)/repos/(.*)-[^-]*$@\1 \2@' | rm -rf * # add the packages back in as remotes -cat "$tree" | while read mode type treehash path; do +count="$(wc -l < "$tree")" +cat -n "$tree" | while read n mode type treehash path; do + printf '\r%s (%i/%i)' "$(gettext 'Adding package')" "$n" "$count" + package="${path%%/*}" repo="$(sed -n "s/^${package} //p" "$repos")" commitfile="../packages-${package}.commits" @@ -33,6 +39,7 @@ cat "$tree" | while read mode type treehash path; do printf '%s\n' "$package" >> "${TMPDIR}/missing-packages/${arch}.tmp" fi done +echo # newline # clean up rm -f "$repos" "$tree" -- cgit v1.1-4-g5e80