diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-12-15 17:27:16 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-01-12 20:31:29 +0100 |
commit | 4731ce5298b8501e5f87ec0b69363ef42d5e9289 (patch) | |
tree | 2575f2682db297eef700968e77202f5d5648e295 /lsinitcpio | |
parent | 9d65344fba27ab87f019fa9071fcea0985c190f7 (diff) | |
download | mkinitcpio-4731ce5298b8501e5f87ec0b69363ef42d5e9289.tar.gz mkinitcpio-4731ce5298b8501e5f87ec0b69363ef42d5e9289.tar.xz |
lsinitcpio: avoid redundancies
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'lsinitcpio')
-rwxr-xr-x | lsinitcpio | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -72,7 +72,7 @@ analyze_image() { local -a binaries explicitmod modules foundhooks hooks local kernver ratio columns=$(tput cols) image=$1 - workdir=$(mktemp -d --tmpdir="$TMPDIR" lsinitcpio.XXXXXX) + workdir=$(mktemp -d --tmpdir lsinitcpio.XXXXXX) trap 'rm -rf "$workdir"' EXIT # fallback in case tput failed us @@ -83,7 +83,7 @@ analyze_image() { # calculate compression ratio TIMEFORMAT=%R decomptime=$({ time decomp "$_image" >/dev/null; } 2>&1) if [[ $_compress ]]; then - fullsize=$(decomp "$_image" | bsdtar xOf - | wc -c) + fullsize=$(decomp "$_image" | wc -c) ratio=.$(( zsize * 1000 / fullsize % 1000 )) fi |