mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-21 03:02:09 +00:00
dialog for china and korea
This commit is contained in:
parent
a8eb27dc3f
commit
1437f7c891
33
dialog.sh
Normal file
33
dialog.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
HEIGHT=15
|
||||
WIDTH=40
|
||||
CHOICE_HEIGHT=4
|
||||
BACKTITLE="Backtitle here"
|
||||
TITLE="Title here"
|
||||
MENU="Choose one of the following options:"
|
||||
|
||||
OPTIONS=(1 "China"
|
||||
2 "Korea"
|
||||
3 "China and Korea")
|
||||
|
||||
CHOICE=$(dialog --clear \
|
||||
--backtitle "$BACKTITLE" \
|
||||
--title "$TITLE" \
|
||||
--menu "$MENU" \
|
||||
$HEIGHT $WIDTH $CHOICE_HEIGHT \
|
||||
"${OPTIONS[@]}" \
|
||||
2>&1 >/dev/tty)
|
||||
|
||||
clear
|
||||
case $CHOICE in
|
||||
1)
|
||||
echo "You chose Option 1"
|
||||
;;
|
||||
2)
|
||||
echo "You chose Option 2"
|
||||
;;
|
||||
3)
|
||||
echo "You chose Option 3"
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user