/contrib/dialog/samples/report-string

https://bitbucket.org/freebsd/freebsd-head/ · #! · 23 lines · 22 code · 1 blank · 0 comment · 0 complexity · ae7cde14e9da94b536f8fd7f981494a6 MD5 · raw file

  1. # $Id: report-string,v 1.2 2010/01/13 10:00:11 tom Exp $
  2. # Report result passed in a string $RESULT
  3. # vile:shmode
  4. case $retval in
  5. $DIALOG_OK)
  6. echo "Result is $RESULT";;
  7. $DIALOG_CANCEL)
  8. echo "Cancel pressed.";;
  9. $DIALOG_HELP)
  10. echo "Help pressed ($RESULT).";;
  11. $DIALOG_EXTRA)
  12. echo "Extra button pressed.";;
  13. $DIALOG_ITEM_HELP)
  14. echo "Item-help button pressed.";;
  15. $DIALOG_ESC)
  16. if test -n "$RESULT" ; then
  17. echo "$RESULT"
  18. else
  19. echo "ESC pressed."
  20. fi
  21. ;;
  22. esac