]> git.ozlabs.org Git - next-scripts/commitdiff
do_merge: Count trees and keep count of progress
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 19 Jun 2015 05:36:58 +0000 (15:36 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 19 Jun 2015 05:55:29 +0000 (15:55 +1000)
do_merge

index 0dfa7d52c7947611f7f29af446dc7e9408ac3cdb..339ec238d97d8be494e78f1afd740c65d84dfc32 100755 (executable)
--- a/do_merge
+++ b/do_merge
@@ -92,10 +92,15 @@ do_rebase()
 
 heads=$(grep -v '^#' $CTRL_FILE | awk -F '\t' '$2=="quilt" || $2=="git" { printf("%s/%s ", $3, $5); }')
 
+tmp=($heads)
+total=${#tmp[@]}
+i=0
+
 need_build=false
 
 for h in $heads; do
        tree=${h%%/*}
+       i=$((i+1))
 
        [ -n "$start_from" ] && {
                if [ "$tree" = "$start_from" ]; then