summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak')
-rw-r--r--sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak84
1 files changed, 84 insertions, 0 deletions
diff --git a/sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak b/sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak
new file mode 100644
index 0000000..8789537
--- /dev/null
+++ b/sys-libs/timezone-data/files/timezone-data-2014j-dialog-2.patch.bak
@@ -0,0 +1,84 @@
+diff --git a/tzselect.ksh b/tzselect.ksh
+index 1816f9f..9280fb9 100644
+--- a/tzselect.ksh
++++ b/tzselect.ksh
+@@ -98,7 +98,7 @@ then
+ case $select_result in
+ "") echo >&2 "Please enter a number in range." ;;
+ # print result
+- ?*) echo "${select_result}"; break
++ ?*) echo -n "${select_result}"; break
+ esac
+ done || exit
+ }
+@@ -138,7 +138,7 @@ else
+ shift `expr $select_i - 1`
+ select_result=$1
+ # print result
+- echo "${select_result}"
++ echo -n "${select_result}"
+ break
+ fi
+ echo >&2 'Please enter a number in range.'
+@@ -177,7 +177,7 @@ showdialog() {
+ inputbox)
+ echo >&2 "${2}"
+ read INPUTBOX
+- echo "${INPUTBOX}"
++ echo -n "${INPUTBOX}"
+ return 0 ;;
+ esac
+ return 1
+diff --git a/tzselect_dialog b/tzselect_dialog
+index a352694..cd93313 100755
+--- a/tzselect_dialog
++++ b/tzselect_dialog
+@@ -28,7 +28,7 @@ TYPE="${1}"
+ shift
+ MSG="${1}"
+ shift
+-MENU_ITEMS=()
++MENU_ITEMS=(0 0)
+ RET_DIALOG=
+
+ case "${TYPE}" in
+@@ -38,7 +38,7 @@ case "${TYPE}" in
+ MENU_ITEMS+=(0)
+ # add value and description
+ while [ $# -gt 0 ]; do
+- MENU_ITEMS+=("$(( ( ${#MENU_ITEMS[@]} +1 ) / 2 ))" "${1}")
++ MENU_ITEMS+=("$(( ( ${#MENU_ITEMS[@]} -1 ) / 2 ))" "${1}")
+ shift
+ done ;;
+ esac
+@@ -47,9 +47,9 @@ esac
+ ANSWER=$("${WHICHDIALOG}" \
+ --no-cancel \
+ "--${TYPE}" \
+- "${MSG}" 0 0 \
++ "${MSG}" \
+ "${MENU_ITEMS[@]}" \
+- 9>&1 1>&2 2>&9)
++ 3>&1 1>&2 2>&3)
+ RET_DIALOG=$?
+
+ # exit on cancel unless it's a yesno
+@@ -58,14 +58,14 @@ RET_DIALOG=$?
+ case "${TYPE}" in
+ yesno)
+ if [ "${RET_DIALOG}" -eq 0 ]; then
+- ANSWER=$([ -n "${1}" ] && echo "${1}" || echo Yes)
++ ANSWER=$([ -n "${1}" ] && echo -n "${1}" || echo -n Yes)
+ else
+- ANSWER=$([ -n "${2}" ] && echo "${2}" || echo No)
++ ANSWER=$([ -n "${2}" ] && echo -n "${2}" || echo -n No)
+ fi ;;
+ # get string from index
+ menu)
+- ANSWER="${MENU_ITEMS[(($ANSWER * 2))]}" || exit $? ;;
++ ANSWER="${MENU_ITEMS[(($ANSWER * 2 + 2))]}" || exit $? ;;
+ esac
+ # print result
+-echo "${ANSWER}"
++echo -n "${ANSWER}"
+ exit 0