xref: /freebsd/contrib/dialog/samples/report-button (revision 410556f1f10fd35b350102725fd8504c3cb0afc8)
1#!/bin/sh
2# $Id: report-button,v 1.8 2020/11/26 00:17:40 tom Exp $
3# Report button-only, no $returntext
4# vile:shmode
5
6case ${returncode:-0} in
7  $DIALOG_OK)
8    echo "OK";;
9  $DIALOG_CANCEL)
10    echo "Cancel pressed.";;
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