From 926eb345c26690ca93b6483ac949612c9b53e9db Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 3 Nov 2018 20:00:07 -0400 Subject: buildsys: remove size_to_human This was only ever used by paccache, and paccache has since been moved to pacman-contrib. --- scripts/library/size_to_human.sh | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 scripts/library/size_to_human.sh (limited to 'scripts/library/size_to_human.sh') diff --git a/scripts/library/size_to_human.sh b/scripts/library/size_to_human.sh deleted file mode 100644 index 1d13eeb4..00000000 --- a/scripts/library/size_to_human.sh +++ /dev/null @@ -1,22 +0,0 @@ -size_to_human() { - awk -v size="$1" ' - BEGIN { - suffix[1] = "B" - suffix[2] = "KiB" - suffix[3] = "MiB" - suffix[4] = "GiB" - suffix[5] = "TiB" - suffix[6] = "PiB" - suffix[7] = "EiB" - count = 1 - - while (size > 1024) { - size /= 1024 - count++ - } - - sizestr = sprintf("%.2f", size) - sub(/\.?0+$/, "", sizestr) - printf("%s %s", sizestr, suffix[count]) - }' -} -- cgit v1.2.3-24-g4f1b