diff options
Diffstat (limited to 'samples/inputmenu-stdout')
| -rwxr-xr-x | samples/inputmenu-stdout | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/samples/inputmenu-stdout b/samples/inputmenu-stdout index a778226b486d..35384d34f167 100755 --- a/samples/inputmenu-stdout +++ b/samples/inputmenu-stdout @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: inputmenu-stdout,v 1.13 2012/07/06 18:11:12 tom Exp $ +# $Id: inputmenu-stdout,v 1.17 2020/11/26 00:30:01 tom Exp $ # 2002 - written by Tobias Rittweiler <tobrit@freebits.de> . ./setup-vars @@ -9,8 +9,8 @@ uid=`id|sed -e 's/^uid=//' -e 's/(.*//'` gid=`id|sed -e 's/^.*gid=//' -e 's/(.*//'` home="$HOME" -while [ ${returncode:-99} -ne 1 -a ${returncode:-99} -ne 250 ]; do - value=`$DIALOG \ +while [ "${returncode:-99}" -ne 1 ] && [ "${returncode:-99}" -ne 250 ]; do + returntext=`$DIALOG \ --stdout --clear --ok-label "Create" \ --backtitle "An Example for the use of --inputmenu:" "$@" \ --inputmenu "Originally I designed --inputmenu for a \ @@ -42,7 +42,7 @@ configuration purpose. Here is a possible piece of a configuration program. \ $user" 10 40 ;; $DIALOG_EXTRA) - value=`echo "$value" | sed -e 's/^RENAMED //'` + value=`echo "$returntext" | sed -e 's/^RENAMED //'` tag=`echo "$value" | sed -e 's/:.*//'` item=`echo "$value" | sed -e 's/^[^:]*:[ ][ ]*//'` @@ -54,8 +54,8 @@ configuration purpose. Here is a possible piece of a configuration program. \ esac ;; - $DIALOG_ESC) - echo "ESC pressed." + *) + . ./report-button break ;; |
