aboutsummaryrefslogtreecommitdiff
path: root/samples/report-string
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-02-26 09:05:35 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-02-26 09:05:35 +0000
commit01b7bcd408fd9e9dc9088b1df5761fcc0971d7e1 (patch)
tree593f2e62b1846058a020ffcecb0ef93eb7ac2153 /samples/report-string
parent4dccdce4191d6e2bc3ba9f782b0fe1aa46b743e3 (diff)
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