summaryrefslogtreecommitdiffstats
path: root/lsinitcpio
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-04-30 03:19:54 +0200
committerDave Reisner <dreisner@archlinux.org>2012-05-02 05:25:07 +0200
commitbd858a51e41cbcbbff67430508494553aeffdd27 (patch)
tree99802aa32c3501ef403ab1875c624ad8ec97530d /lsinitcpio
parentbcbc009ccc8397c177877383570eb2dde7758c13 (diff)
downloadmkinitcpio-bd858a51e41cbcbbff67430508494553aeffdd27.tar.gz
mkinitcpio-bd858a51e41cbcbbff67430508494553aeffdd27.tar.xz
lsinitcpio: fallback on 80 cols when tput fails
This only happens when the terminfo file is missing, but its a simple fix. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'lsinitcpio')
-rwxr-xr-xlsinitcpio3
1 files changed, 3 insertions, 0 deletions
diff --git a/lsinitcpio b/lsinitcpio
index 54ff534..5abe37f 100755
--- a/lsinitcpio
+++ b/lsinitcpio
@@ -127,6 +127,9 @@ if (( analyze )); then
declare -a binaries explicitmod modules foundhooks hooks
declare kernver ratio columns=$(tput cols)
+ # fallback in case tput failed us
+ columns=${columns:-80}
+
zsize=$(stat -c %s "$image")
# calculate compression ratio