2012-10-21 18:18:09 +00:00
|
|
|
#!/bin/sh
|
2021-02-26 09:05:35 +00:00
|
|
|
# $Id: report-string,v 1.8 2020/11/26 00:18:32 tom Exp $
|
|
|
|
# Report result passed in a string $returntext
|
2011-01-13 02:21:23 +00:00
|
|
|
# vile:shmode
|
|
|
|
|
2021-02-26 09:05:35 +00:00
|
|
|
case ${returncode:-0} in
|
2011-01-13 02:21:23 +00:00
|
|
|
$DIALOG_OK)
|
2021-02-26 09:05:35 +00:00
|
|
|
echo "Result is $returntext";;
|
2011-01-13 02:21:23 +00:00
|
|
|
$DIALOG_CANCEL)
|
|
|
|
echo "Cancel pressed.";;
|
|
|
|
$DIALOG_HELP)
|
2021-02-26 09:05:35 +00:00
|
|
|
echo "Help pressed ($returntext).";;
|
2011-01-13 02:21:23 +00:00
|
|
|
$DIALOG_EXTRA)
|
|
|
|
echo "Extra button pressed.";;
|
|
|
|
$DIALOG_ITEM_HELP)
|
|
|
|
echo "Item-help button pressed.";;
|
2021-02-26 09:05:35 +00:00
|
|
|
$DIALOG_TIMEOUT)
|
|
|
|
echo "Timeout expired.";;
|
2011-01-13 02:21:23 +00:00
|
|
|
$DIALOG_ESC)
|
2021-02-26 09:05:35 +00:00
|
|
|
if test -n "$returntext" ; then
|
|
|
|
echo "$returntext"
|
2011-01-13 02:21:23 +00:00
|
|
|
else
|
|
|
|
echo "ESC pressed."
|
|
|
|
fi
|
|
|
|
;;
|
2021-02-26 09:05:35 +00:00
|
|
|
*)
|
|
|
|
echo "Return code was $returncode";;
|
2011-01-13 02:21:23 +00:00
|
|
|
esac
|