summaryrefslogtreecommitdiffstats
path: root/lsinitcpio
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-05-13 21:35:16 +0200
committerDave Reisner <dreisner@archlinux.org>2012-05-18 19:09:37 +0200
commit013fe608a00be5c56d9dc9696c5cf8542d0c5736 (patch)
treebb7a64eb41d596c592d383a8e6e88108c144a48e /lsinitcpio
parent1007ca6065131eb2770e9a08fac3b19c14527140 (diff)
downloadmkinitcpio-013fe608a00be5c56d9dc9696c5cf8542d0c5736.tar.gz
mkinitcpio-013fe608a00be5c56d9dc9696c5cf8542d0c5736.tar.xz
lsinitcpio: Always show extraction time
Even for uncompressed images, estimate the work being done to extract to ramfs. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'lsinitcpio')
-rwxr-xr-xlsinitcpio4
1 files changed, 2 insertions, 2 deletions
diff --git a/lsinitcpio b/lsinitcpio
index 6cb9b07..9cb5209 100755
--- a/lsinitcpio
+++ b/lsinitcpio
@@ -135,8 +135,8 @@ if (( analyze )); then
zsize=$(stat -c %s "$image")
# calculate compression ratio
+ TIMEFORMAT=%R decomptime=$({ time decomp "$image" >/dev/null; } 2>&1 )
if [[ $compress ]]; then
- TIMEFORMAT=%R decomptime=$({ time decomp "$image" >/dev/null; } 2>&1 )
fullsize=$(decomp "$image" | bsdtar xOf - | wc -c)
ratio=.$(( zsize * 1000 / fullsize % 1000 ))
fi
@@ -181,8 +181,8 @@ if (( analyze )); then
if [[ $compress ]]; then
msg 'Compressed with: %s' "$compress"
msg2 'Uncompressed size: %s (%s ratio)' "$(size_to_human "$fullsize")" "$ratio"
- msg2 'Estimated decompression time: %ss' "$decomptime"
fi
+ msg2 'Estimated extraction time: %ss' "$decomptime"
printf '\n'
if (( ${#modules[*]} )); then