From: xf0r3m Date: Fri, 14 Jul 2023 07:06:40 +0000 (+0200) Subject: Dodano sume rozpakowanych kontenerów X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=fd21a5dafbfc32009641c78b18300e18083055bd;p=idle.git Dodano sume rozpakowanych kontenerów --- diff --git a/get_image_size b/get_image_size index 4897e78..07ee8b3 100755 --- a/get_image_size +++ b/get_image_size @@ -11,11 +11,14 @@ function get_image_size() { total=$(echo "$total + $float_size" | bc -l); echo "$remote = $image_size"; done + csize_total=$(echo "$(cut -d ";" -f 2 $1 | grep '^[0-9\.]*' | awk '{printf $1" "}' | sed -s 's/ /+/g')0" | bc -l); if [ $(echo $total | cut -d "." -f 1) -gt 1024 ]; then total=$(echo "$total / 1024" | bc -l | cut -c 1-4); + csize_total=$(echo "$csize_total / 1024" | bc -l | cut -c 1-4); size_suffix="GB"; fi echo "Total: ${total}${size_suffix}"; + echo "Aprox. container size: ${csize_total}${size_suffix}"; } get_image_size $filename;