Browse files

Explicitly use "du -k" to set block size in t/

Commit e351481 (Explicitly select the "du" block size in t/
used the parameter "-B 1024" which isn't portable. Now use "du -k"
to explicitly get output in kilobytes.

At least du(1) on Linux (GNU coreutils), Mac OS X, FreeBSD, NetBSD,
and OpenBSD support this option.

Signed-off-by: Alexander Barton <>
Reviewed-by: Rob Browning <>
  • Loading branch information...
1 parent 0c9ebc5 commit 51691034c6e0d23c557e4b57ed43e35c34a8ef5b @alexbarton alexbarton committed with rlbdv Jan 26, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 t/
@@ -473,7 +473,7 @@ WVPASS bup save -n compression -0 --strip $TOP/Documentation
# is harmless there.)
WVPASSEQ "$(bup ls compression/latest/ | sort)" \
"$(ls $TOP/Documentation | grep -v '^\.' | sort)"
-COMPRESSION_0_SIZE=$(du -B 1024 -s $D | cut -f1)
+COMPRESSION_0_SIZE=$(du -k -s $D | cut -f1)
export BUP_DIR="$TOP/$D/.bup"
@@ -483,7 +483,7 @@ WVPASS bup init
WVPASS bup index $TOP/Documentation
WVPASS bup save -n compression -9 --strip $TOP/Documentation
WVPASSEQ "$(bup ls compression/latest/ | sort)" "$(ls $TOP/Documentation | sort)"
-COMPRESSION_9_SIZE=$(du -B 1024 -s $D | cut -f1)
+COMPRESSION_9_SIZE=$(du -k -s $D | cut -f1)

0 comments on commit 5169103

Please sign in to comment.