From a98fce08968febe7395b30f15f070f400da089ed Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 6 May 2012 18:27:43 -0400 Subject: scripts/library: add size_to_human This function is the reverse of human_to_size, and converts integer byte sizes to human readable SI prefixed values. A logical extension of this might be to mimic the formatter that pacman uses and allow a second argument to be passed in which can coerce the size, rather than reducing until the unit count is below 1024. Signed-off-by: Dave Reisner --- scripts/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/Makefile.am') diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 75699b2e..29c81aa5 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -28,7 +28,8 @@ EXTRA_DIST = \ LIBRARY = \ library/output_format.sh \ library/parseopts.sh \ - library/human_to_size.sh + library/human_to_size.sh \ + library/size_to_human.sh # Files that should be removed, but which Automake does not know. MOSTLYCLEANFILES = $(bin_SCRIPTS) -- cgit v1.2.3-24-g4f1b