2012-10-21 20:18:09 +02:00
|
|
|
#!/bin/sh
|
2021-02-26 10:05:35 +01:00
|
|
|
# $Id: report-tempfile,v 1.9 2020/11/26 00:18:32 tom Exp $
|
2011-01-13 03:21:23 +01:00
|
|
|
# Report results in a temporary-file.
|
|
|
|
# vile:shmode
|
|
|
|
|
2021-02-26 10:05:35 +01:00
|
|
|
case "${returncode:-0}" in
|
2011-01-13 03:21:23 +01:00
|
|
|
$DIALOG_OK)
|
2021-02-26 10:05:35 +01:00
|
|
|
echo "Result: `cat "$tempfile"`";;
|
2011-01-13 03:21:23 +01:00
|
|
|
$DIALOG_CANCEL)
|
|
|
|
echo "Cancel pressed.";;
|
|
|
|
$DIALOG_HELP)
|
2021-02-26 10:05:35 +01:00
|
|
|
echo "Help pressed: `cat "$tempfile"`";;
|
2011-01-13 03:21:23 +01:00
|
|
|
$DIALOG_EXTRA)
|
|
|
|
echo "Extra button pressed.";;
|
|
|
|
$DIALOG_ITEM_HELP)
|
2021-02-26 10:05:35 +01:00
|
|
|
echo "Item-help button pressed: `cat "$tempfile"`";;
|
|
|
|
$DIALOG_TIMEOUT)
|
|
|
|
echo "Timeout expired.";;
|
2011-01-13 03:21:23 +01:00
|
|
|
$DIALOG_ESC)
|
2021-02-26 10:05:35 +01:00
|
|
|
if test -s "$tempfile" ; then
|
|
|
|
cat "$tempfile"
|
2011-01-13 03:21:23 +01:00
|
|
|
else
|
|
|
|
echo "ESC pressed."
|
|
|
|
fi
|
|
|
|
;;
|
2021-02-26 10:05:35 +01:00
|
|
|
*)
|
|
|
|
echo "Return code was $returncode";;
|
2011-01-13 03:21:23 +01:00
|
|
|
esac
|