1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/contrib/dialog/samples/report-tempfile
Devin Teske febdb46880 Update dialog to 1.2-20130923.
Approved by:	re (marius)
2013-09-24 14:52:43 +00:00

25 lines
544 B
Bash

#!/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