From aefada8a126a83f6f6bc4aa7523aceb7a0fa85cf Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Wed, 2 Sep 2015 21:17:08 +0200 Subject: [PATCH] Fix --help output with GNU fmt(1) BSD fmt accepts two numeric parameters defining goal with and maximum width. GNU's version, however, would interpret these numeric options as files. Both GNU and BSD fmt(1) support the -w option to specify the maximum width. GNU's version automatically sets the goal width based on that value, but BSD fmt does not support setting the goal width in any other way and does not automatically determine it either. We'll have to live with the slightly less beautiful output on OS X and BSD, then. Closes #5 --- google-font-download | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-font-download b/google-font-download index 7ad1520..1a9ef6b 100755 --- a/google-font-download +++ b/google-font-download @@ -51,7 +51,7 @@ url="http://fonts.googleapis.com/css" # Usage message usage() { cols=$(tput cols) || cols=80 - fmt $(( cols - 8 )) $cols >&2 <<-EOF + fmt -w $(( cols - 8 )) >&2 <<-EOF USAGE ${0:-google-font-download} [OPTION...] [FONT...] @@ -136,7 +136,7 @@ if [ $modern_getopt -eq 1 ]; then fi else cols=$(tput cols) || cols=80 - fmt $(( cols - 8 )) $cols >&2 <<-EOF + fmt -w $(( cols - 8 )) >&2 <<-EOF Warning: Old getopt(1) detected. Your version of getopt(1) does not correctly deal with whitespace and does not support long options. You may