summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_openwrt.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-07-06 01:03:50 +0200
committerHolger Levsen <holger@layer-acht.org>2015-07-06 01:03:50 +0200
commit4c0c59b1e34d05de3b224a3d18d3a77dd6fc2dda (patch)
treef6a484b9c124103073faf3f2a01ea79e355b9158 /bin/reproducible_openwrt.sh
parent2aec09b9768ce2723747837f4ca59d97bf5af7ec (diff)
downloadjenkins.debian.net-4c0c59b1e34d05de3b224a3d18d3a77dd6fc2dda.tar.xz
reproducible coreboot/openwrt/netbsd: display sensible file sizes
Diffstat (limited to 'bin/reproducible_openwrt.sh')
-rwxr-xr-xbin/reproducible_openwrt.sh13
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index cc94284c..9c3c5bb5 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -207,6 +207,7 @@ DBD_HTML=$(mktemp --tmpdir=$TMPDIR)
# run debbindiff on the images
GOOD_IMAGES=0
ALL_IMAGES=0
+SIZE=""
create_results_dirs
cd $TMPDIR/b1
tree .
@@ -216,15 +217,14 @@ for i in * ; do
for j in $(find * -name "*.bin" -o -name "*.squashfs" |sort -u ) ; do
let ALL_IMAGES+=1
call_debbindiff_on_any_file $i $j
- SIZE="$(du -h -b $j | cut -f1)"
- SIZE="$(echo $SIZE/1024|bc)"
+ get_filesize $j
if [ -f $TMPDIR/$i/$j.html ] ; then
mkdir -p $BASE/openwrt/dbd/$i
mv $TMPDIR/$i/$j.html $BASE/openwrt/dbd/$i/$j.html
echo " <tr><td><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> (${SIZE}K) is unreproducible.</td></tr>" >> $DBD_HTML
else
SHASUM=$(sha256sum $j|cut -d " " -f1)
- echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, ${SIZE}K) is reproducible.</td></tr>" >> $DBD_HTML
+ echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, $SIZE) is reproducible.</td></tr>" >> $DBD_HTML
let GOOD_IMAGES+=1
rm -f $BASE/openwrt/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed
fi
@@ -244,15 +244,14 @@ for i in * ; do
for j in $(find * -name "*.ipk" |sort -u ) ; do
let ALL_PACKAGES+=1
call_debbindiff_on_any_file $i $j
- SIZE="$(du -h -b $j | cut -f1)"
- SIZE="$(echo $SIZE/1024|bc)"
+ get_filesize $j
if [ -f $TMPDIR/$i/$j.html ] ; then
mkdir -p $BASE/openwrt/dbd/$i/$(dirname $j)
mv $TMPDIR/$i/$j.html $BASE/openwrt/dbd/$i/$j.html
- echo " <tr><td><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> (${SIZE}K) is unreproducible.</td></tr>" >> $DBD_HTML
+ echo " <tr><td><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> ($SIZE) is unreproducible.</td></tr>" >> $DBD_HTML
else
SHASUM=$(sha256sum $j|cut -d " " -f1)
- echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, ${SIZE}K) is reproducible.</td></tr>" >> $DBD_HTML
+ echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, $SIZE) is reproducible.</td></tr>" >> $DBD_HTML
let GOOD_PACKAGES+=1
rm -f $BASE/openwrt/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed
fi