-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainMenu.sh
64 lines (58 loc) · 1.85 KB
/
MainMenu.sh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
#This is the main menu of the Image Assistant
set -e
set -u
clear
cd $(dirname $0)
#Creates the AS2 Image Assistant directory - This directory will be used to save lists and other files important for the script to run.
[ ! -d ~/AS2ImageAssistant/ ] && mkdir ~/AS2ImageAssistant/
#Here is where I populate the menu options
home_screen () {
clear
echo ""
echo " ##########################################"
echo " # #"
echo " # AppStream 2.0 Image Assistant (beta) #"
echo " # #"
echo " ##########################################"
echo ""
echo "1) Add applications"
echo "2) List applications"
echo "3) Test applications"
echo "4) Remove application"
echo "5) Create/Update Session Script"
echo "6) Create/Update Environment Variables"
echo "7) Create Image"
echo "8) Exit"
echo ""
}
echo ""
echo " ##########################################"
echo " # #"
echo " # AppStream 2.0 Image Assistant (beta) #"
echo " # #"
echo " ##########################################"
echo ""
options=(
"Add applications"
"List applications"
"Test applications"
"Remove application"
"Create/Update Session Script"
"Create/Update Environment Variables"
"Create Image"
"Exit"
)
PS3="Choose an action (1-${#options[@]}): "
select option in "${options[@]}"; do
case "$REPLY" in
1) ./AddApplications.sh && home_screen ;;
2) ./ListApplications.sh && home_screen ;;
3) ./TestApplications.sh && home_screen ;;
4) ./RemoveApplication.sh && home_screen ;;
5) ./CreateSessionScript.sh && home_screen ;;
6) ./CreateEnvVariables.sh && home_screen ;;
7) ./CreateImage.sh && home_screen ;;
8) break ;;
esac
done