summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-01-29 14:20:38 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-01-29 14:20:38 -0500
commite12c3b994c12284d971e962985edc5d872671ca9 (patch)
tree7729a8edcead36539b08d8563384e213c28859f7
parentd58e08c0bc1a0ab13340e7b18cc7848f1a7b01bc (diff)
prettify the output of pbs-absrepo-convert--filterarch
-rwxr-xr-xpbs-absrepo-convert--filterarch9
1 files changed, 8 insertions, 1 deletions
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"