Commit f67e6260 authored by Holger Levsen's avatar Holger Levsen

reproducible OpenWrt: correctly calculate percentage of reproducible packages and images

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 0b8699b8
......@@ -560,7 +560,11 @@ for target in * ; do
done
cd ..
done
GOOD_PERCENT_IMAGES=$(echo "scale=1 ; ($GOOD_IMAGES*100/$ALL_IMAGES)" | bc | grep -qs . || echo 0.00)
if [ $ALL_IMAGES -ne 0 ] ; then
GOOD_PERCENT_IMAGES=$(echo "scale=1 ; ($GOOD_IMAGES*100/$ALL_IMAGES)" | bc )
else
GOOD_PERCENT_IMAGES=0
fi
# run diffoscope on the packages
GOOD_PACKAGES=0
ALL_PACKAGES=0
......@@ -609,7 +613,11 @@ echo " </table>" >> "$DBD_HTML"
echo " <table><tr><th>Reproducible packages</th></tr>" >> "$DBD_HTML"
cat "$DBD_GOOD_PKGS_HTML" >> "$DBD_HTML"
echo " </table>" >> "$DBD_HTML"
GOOD_PERCENT_PACKAGES=$(echo "scale=1 ; ($GOOD_PACKAGES*100/$ALL_PACKAGES)" | bc | grep -qs . || echo 0.00)
if [ $ALL_PACKAGES -ne 0 ] ; then
GOOD_PERCENT_PACKAGES=$(echo "scale=1 ; ($GOOD_PACKAGES*100/$ALL_PACKAGES)" | bc )
else
GOOD_PERCENT_PACKAGES=0
fi
# are we there yet?
if [ "$GOOD_PERCENT_IMAGES" = "100.0" ] || [ "$GOOD_PERCENT_PACKAGES" = "100.0" ]; then
MAGIC_SIGN="!"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment