summaryrefslogtreecommitdiff
path: root/contrib/dialog/samples/report-button
blob: 0976c96a9d83026b6068c168522efbf985e1a80e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# $Id: report-button,v 1.8 2020/11/26 00:17:40 tom Exp $
# Report button-only, no $returntext
# vile:shmode

case ${returncode:-0} in
  $DIALOG_OK)
    echo "OK";;
  $DIALOG_CANCEL)
    echo "Cancel pressed.";;
  $DIALOG_HELP)
    echo "Help pressed.";;
  $DIALOG_EXTRA)
    echo "Extra button pressed.";;
  $DIALOG_ITEM_HELP)
    echo "Item-help button pressed.";;
  $DIALOG_TIMEOUT)
    echo "Timeout expired.";;
  $DIALOG_ERROR)
    echo "ERROR!";;
  $DIALOG_ESC)
    echo "ESC pressed.";;
  *)
    echo "Return code was $returncode";;
esac