forked from andersdd/xtuple-utility
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainmenu.sh
More file actions
36 lines (29 loc) · 982 Bytes
/
mainmenu.sh
File metadata and controls
36 lines (29 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
main_menu() {
log "Opened main menu"
while true; do
CC=$(whiptail --backtitle "$( window_title )" --menu "$( menu_title Main\ Menu)" 0 0 1 --cancel-button "Exit" --ok-button "Select" \
"1" "Quick Install" \
"2" "PostgreSQL Maintenance" \
"3" "Database Maintenance" \
"4" "Development Environment Setup" \
"5" "SSH Connection Manager" \
"6" "Generate Github Token" \
3>&1 1>&2 2>&3)
RET=$?
if [ $RET -ne 0 ]; then
do_exit
else
case "$CC" in
"1") provision_menu ;;
"2") postgresql_menu ;;
"3") database_menu ;;
"4") dev_menu ;;
"5") selectServer;;
"6") generate_github_token;;
*) msgbox "Don't know how you got here! Please report on GitHub >> mainmenu" && do_exit ;;
esac
fi
done
}
main_menu