summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/reproducible_common.sh')
-rwxr-xr-xbin/reproducible_common.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 4b6fc2f0..777cd63f 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -411,3 +411,14 @@ call_debbindiff_on_any_file() {
echo $msg | tee -a $TMPDIR/$1/$2.html
fi
}
+
+get_filesize() {
+ local BYTESIZE="$(du -h -b $1 | cut -f1)"
+ if [ $BYTESIZE -gt 1048576 ] ; then
+ SIZE="$(echo $BYTESIZE/1048576|bc)M"
+ elif [ $BYTESIZE -gt 1024 ] ; then
+ SIZE="$(echo $BYTESIZE/1024|bc)K"
+ else
+ SIZE="$(echo $BYTESIZE/1024|bc) bytes"
+ fi
+}