From f868715f5f722aa2cdaee1709372e1d319bab238 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 7 Oct 2014 18:27:10 +0200 Subject: reproducible: refactor, introduce associative array --- bin/reproducible_stats.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index 1bccbf20..49b960e1 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -38,6 +38,7 @@ PERCENT_NOTFORUS=$(echo "scale=1 ; ($COUNT_NOTFORUS*100/$COUNT_TOTAL)" | bc) PERCENT_SOURCELESS=$(echo "scale=1 ; ($COUNT_SOURCELESS*100/$COUNT_TOTAL)" | bc) GUESS_GOOD=$(echo "$PERCENT_GOOD*$AMOUNT/100" | bc) declare -A STAR +declare -A LINKTARGET write_summary() { echo "$1" >> $SUMMARY @@ -117,10 +118,11 @@ link_packages() { write_pkg_frameset "$PKG" "$MAINLINK" fi if [ -f "/var/lib/jenkins/userContent/rbuild/${PKG}_${EVERSION}.rbuild.log" ] ; then - write_summary " $PKG${STAR[$PKG]} " + LINKTARGET[$PKG]="$PKG${STAR[$PKG]}" else - write_summary " $PKG " + LINKTARGET[$PKG]="$PKG" fi + write_summary " ${LINKTARGET[$PKG]} " done } -- cgit v1.2.3-54-g00ecf