xref: /freebsd/contrib/bsddialog/examples_utility/msgbox.sh (revision 1323ec571215a77ddd21294f0871979d5ad6b992)
1#!/bin/sh
2#-
3# SPDX-License-Identifier: CC0-1.0
4#
5# Written in 2021 by Alfonso Sabato Siciliano.
6#
7# To the extent possible under law, the author has dedicated all copyright
8# and related and neighboring rights to this software to the public domain
9# worldwide. This software is distributed without any warranty, see:
10#	<http://creativecommons.org/publicdomain/zero/1.0/>.
11
12: ${BSDDIALOG_ERROR=255}
13: ${BSDDIALOG_OK=0}
14: ${BSDDIALOG_ESC=5}
15
16./bsddialog --title " msgbox " --msgbox "Hello World!" 6 20
17
18case $? in
19	$BSDDIALOG_ERROR )
20		exit 1
21	;;
22	$BSDDIALOG_ESC )
23		echo "[ESC]"
24	;;
25	$BSDDIALOG_OK )
26		echo "[OK]"
27	;;
28esac
29