freebsd-src/contrib/dialog/samples/report-string

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
644 B
Plaintext
Raw Normal View History

2012-10-21 18:18:09 +00:00
#!/bin/sh
# $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
case ${returncode:-0} in
2011-01-13 02:21:23 +00:00
$DIALOG_OK)
echo "Result is $returntext";;
2011-01-13 02:21:23 +00:00
$DIALOG_CANCEL)
echo "Cancel pressed.";;
$DIALOG_HELP)
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.";;
$DIALOG_TIMEOUT)
echo "Timeout expired.";;
2011-01-13 02:21:23 +00:00
$DIALOG_ESC)
if test -n "$returntext" ; then
echo "$returntext"
2011-01-13 02:21:23 +00:00
else
echo "ESC pressed."
fi
;;
*)
echo "Return code was $returncode";;
2011-01-13 02:21:23 +00:00
esac