HardenedBSD/contrib/dialog/samples/report-string
Baptiste Daroussin 2a3e3873a1 Update dialog to 1.2-20130523
Level up WARNS
2013-06-17 10:28:55 +00:00

25 lines
520 B
Bash

#!/bin/sh
# $Id: report-string,v 1.3 2012/06/29 09:32:17 tom Exp $
# Report result passed in a string $RESULT
# vile:shmode
case $retval in
$DIALOG_OK)
echo "Result is $RESULT";;
$DIALOG_CANCEL)
echo "Cancel pressed.";;
$DIALOG_HELP)
echo "Help pressed ($RESULT).";;
$DIALOG_EXTRA)
echo "Extra button pressed.";;
$DIALOG_ITEM_HELP)
echo "Item-help button pressed.";;
$DIALOG_ESC)
if test -n "$RESULT" ; then
echo "$RESULT"
else
echo "ESC pressed."
fi
;;
esac