xref: /freebsd/contrib/dialog/samples/report-yesno (revision a03411e84728e9b267056fd31c7d1d9d1dc1b01e)
1#!/bin/sh
2# $Id: report-yesno,v 1.7 2020/11/26 00:18:32 tom Exp $
3# Report button-only, no $returntext
4# vile:shmode
5
6case ${returncode:-0} in
7  $DIALOG_OK)
8    echo "YES";;
9  $DIALOG_CANCEL)
10    echo "NO";;
11  $DIALOG_HELP)
12    echo "Help pressed.";;
13  $DIALOG_EXTRA)
14    echo "Extra button pressed.";;
15  $DIALOG_ITEM_HELP)
16    echo "Item-help button pressed.";;
17  $DIALOG_TIMEOUT)
18    echo "Timeout expired.";;
19  $DIALOG_ERROR)
20    echo "ERROR!";;
21  $DIALOG_ESC)
22    echo "ESC pressed.";;
23  *)
24    echo "Return code was $returncode";;
25esac
26