summaryrefslogtreecommitdiffstats
path: root/contrib/dialog/samples/report-tempfile
blob: 4c5f0994e8a6bec33f9d25563eeb9e37c169f045 (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
#!/bin/sh
# $Id: report-tempfile,v 1.5 2013/09/02 18:03:13 tom Exp $
# Report results in a temporary-file.
# vile:shmode

case $retval in
  $DIALOG_OK)
    echo "Result: `cat $tempfile`";;
  $DIALOG_CANCEL)
    echo "Cancel pressed.";;
  $DIALOG_HELP)
    echo "Help pressed: `cat $tempfile`";;
  $DIALOG_EXTRA)
    echo "Extra button pressed.";;
  $DIALOG_ITEM_HELP)
    echo "Item-help button pressed: `cat $tempfile`";;
  $DIALOG_ESC)
    if test -s $tempfile ; then
      cat $tempfile
    else
      echo "ESC pressed."
    fi
    ;;
esac
OpenPOWER on IntegriCloud