aboutsummaryrefslogtreecommitdiff
path: root/samples/report-string
diff options
context:
space:
mode:
Diffstat (limited to 'samples/report-string')
-rw-r--r--samples/report-string18
1 files changed, 11 insertions, 7 deletions
diff --git a/samples/report-string b/samples/report-string
index dc96c2fab2e2..e6ccb6433d2f 100644
--- a/samples/report-string
+++ b/samples/report-string
@@ -1,24 +1,28 @@
#!/bin/sh
-# $Id: report-string,v 1.3 2012/06/29 09:32:17 tom Exp $
-# Report result passed in a string $RESULT
+# $Id: report-string,v 1.8 2020/11/26 00:18:32 tom Exp $
+# Report result passed in a string $returntext
# vile:shmode
-case $retval in
+case ${returncode:-0} in
$DIALOG_OK)
- echo "Result is $RESULT";;
+ echo "Result is $returntext";;
$DIALOG_CANCEL)
echo "Cancel pressed.";;
$DIALOG_HELP)
- echo "Help pressed ($RESULT).";;
+ echo "Help pressed ($returntext).";;
$DIALOG_EXTRA)
echo "Extra button pressed.";;
$DIALOG_ITEM_HELP)
echo "Item-help button pressed.";;
+ $DIALOG_TIMEOUT)
+ echo "Timeout expired.";;
$DIALOG_ESC)
- if test -n "$RESULT" ; then
- echo "$RESULT"
+ if test -n "$returntext" ; then
+ echo "$returntext"
else
echo "ESC pressed."
fi
;;
+ *)
+ echo "Return code was $returncode";;
esac