]> arthur.barton.de Git - bup.git/commitdiff
Explicitly use "du -k" to set block size in t/test.sh.
authorAlexander Barton <alex@barton.de>
Sat, 26 Jan 2013 18:48:47 +0000 (19:48 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 27 Jan 2013 17:43:31 +0000 (11:43 -0600)
Commit e3514812 (Explicitly select the "du" block size in t/test.sh)
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 <alex@barton.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
t/test.sh

index 64ff596653abeb29f71cb3bd2216ecb4c69a8469..4d65f26d3484df59cdfffd1620373412022640ba 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -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)
 
 D=compression9.tmp
 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)
 
 WVPASS [ "$COMPRESSION_9_SIZE" -lt "$COMPRESSION_0_SIZE" ]