diff options
author | P. J. McDermott <pjm@nac.net> | 2013-10-06 21:48:50 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-10-06 21:48:50 (EDT) |
commit | 9b7f87737de25558cc3513f7be13a78caa9d4834 (patch) | |
tree | 37b92f595e674aa62efd9245ba908ea63170f87b /patches/03_tzselect.ksh-doselect-Prompt-to-stderr-not-stdout.patch | |
parent | 0cabf9b8787dfb76a4acf9670d21401b4f3324dc (diff) |
Add tzselect portability packages.
I also submitted a patch to make tzselect work on older versions of BusyBox awk,
but ProteanOS's BusyBox is new enough to not need it.
Diffstat (limited to 'patches/03_tzselect.ksh-doselect-Prompt-to-stderr-not-stdout.patch')
-rw-r--r-- | patches/03_tzselect.ksh-doselect-Prompt-to-stderr-not-stdout.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/03_tzselect.ksh-doselect-Prompt-to-stderr-not-stdout.patch b/patches/03_tzselect.ksh-doselect-Prompt-to-stderr-not-stdout.patch new file mode 100644 index 0000000..b8d44ee --- /dev/null +++ b/patches/03_tzselect.ksh-doselect-Prompt-to-stderr-not-stdout.patch @@ -0,0 +1,30 @@ +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Sun, 6 Oct 2013 12:28:30 -0700 +Origin: upstream, https://github.com/eggert/tz/commit/0f9614b +Subject: * tzselect.ksh (doselect): Prompt to stderr, not stdout. + +(Thanks to Patrick 'P. J.' McDermott.) + +--- +diff --git a/tzselect.ksh b/tzselect.ksh +index 47c67bd..9d70691 100644 +--- a/tzselect.ksh ++++ b/tzselect.ksh +@@ -119,7 +119,7 @@ else + for select_word + do + select_i=`expr $select_i + 1` +- printf "%${select_width}d) %s\\n" $select_i "$select_word" ++ printf >&2 "%${select_width}d) %s\\n" $select_i "$select_word" + done ;; + *[!0-9]*) + echo >&2 'Please enter a number in range.' ;; +@@ -133,7 +133,7 @@ else + esac + + # Prompt and read input. +- printf %s >&2 "${PS3-#? }" ++ printf >&2 %s "${PS3-#? }" + read select_i || exit + done + } |