summaryrefslogtreecommitdiffstats
path: root/contrib/dialog/samples/report-tempfile
blob: 32c04e0cb54d771f3fdf761c173db84953ec5300 (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.4 2012/06/29 09:29:47 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.";;
  $DIALOG_EXTRA)
    echo "Extra button pressed.";;
  $DIALOG_ITEM_HELP)
    echo "Item-help button pressed.";;
  $DIALOG_ESC)
    if test -s $tempfile ; then
      cat $tempfile
    else
      echo "ESC pressed."
    fi
    ;;
esac
OpenPOWER on IntegriCloud