@@ -7,72 +7,240 @@ YELLOW='\033[0;33m'
7
7
BLUE=' \033[0;34m'
8
8
NC=' \033[0m' # No Color
9
9
10
- # Declare arrays for storing common dependencies and Magento versions
11
- declare -a common_dependencies
12
- declare -a magento_versions=(" 2.4.2-p2" " 2.4.3-p3" " 2.4.4" " 2.4.4-p1" " 2.4.4-p2" " 2.4.4-p3" " 2.4.4-p4" " 2.4.4-p5" " 2.4.4-p6" " 2.4.4-p7" " 2.4.4-p8" " 2.4.4-p9" " 2.4.5" " 2.4.5-p1" " 2.4.5-p2" " 2.4.5-p3" " 2.4.5-p4" " 2.4.5-p5" " 2.4.5-p6" " 2.4.5-p7" " 2.4.5-p8" " 2.4.6" " 2.4.6-p1" " 2.4.6-p2" " 2.4.6-p3" " 2.4.6-p4" " 2.4.6-p5" " 2.4.6-p6" " 2.4.7" " 2.4.7-p1" )
10
+ # Function to display the script header
11
+ show_header () {
12
+ echo -e " ${GREEN} ============================================${NC} "
13
+ echo -e " ${GREEN} Magento 2 System Requirements Checker${NC} "
14
+ echo -e " ${GREEN} ============================================${NC} "
15
+ echo
16
+ }
13
17
14
- # Assign common dependencies to corresponding Magento versions
15
- common_dependencies[0]=" Composer:1 Elasticsearch:7.9 OpenSearch:-- MariaDB:10.4 MySQL:8.0 PHP:7.4 RabbitMQ:3.8 Redis:6.0 Varnish:6.4 Apache:2.4 nginx:1.18 'AWS-Aurora-(MySQL)':-- 'AWS-S3':✔️ 'AWS-MQ':-- 'AWS-ElastiCache':-- 'AWS-Elasticsearch':-- 'AWS-OpenSearch':--"
16
- common_dependencies[1]=" Composer:1 Elasticsearch:7.16 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:7.4 RabbitMQ:3.8 Redis:6.0 Varnish:6.5 Apache:2.4 nginx:1.18 'AWS-Aurora-(MySQL)':5.7 'AWS-S3':✔️ 'AWS-MQ':3.8.11 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':--"
17
- common_dependencies[2]=" Composer:2.1 Elasticsearch:7.16 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':5.7 'AWS-S3':✔️ 'AWS-MQ':3.8.11 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':--"
18
- common_dependencies[3]=" Composer:2.1 Elasticsearch:7.16 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':5.7 'AWS-S3':✔️ 'AWS-MQ':3.8.11 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':--"
19
- common_dependencies[4]=" Composer:2.1 Elasticsearch:7.16 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':5.7 'AWS-S3':✔️ 'AWS-MQ':3.8.11 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':--"
20
- common_dependencies[5]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.1 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
21
- common_dependencies[6]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
22
- common_dependencies[7]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
23
- common_dependencies[8]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
24
- common_dependencies[9]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
25
- common_dependencies[10]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.3 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
26
- common_dependencies[11]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.3 MariaDB:10.5,10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
27
- common_dependencies[12]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':1.2"
28
- common_dependencies[13]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':1.2"
29
- common_dependencies[14]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.1 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
30
- common_dependencies[15]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.11,3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
31
- common_dependencies[16]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.11,3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
32
- common_dependencies[17]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.11,3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
33
- common_dependencies[18]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.11,3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
34
- common_dependencies[19]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.3 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.12,3.11,3.9 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
35
- common_dependencies[20]=" Composer:2.2 Elasticsearch:7.17 OpenSearch:1.3 MariaDB:10.5,10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.12,3.11 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
36
- common_dependencies[21]=" Composer:2.2 Elasticsearch:8.4,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.1 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
37
- common_dependencies[22]=" Composer:2.2 Elasticsearch:8.5,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
38
- common_dependencies[23]=" Composer:2.2 Elasticsearch:8.5,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
39
- common_dependencies[24]=" Composer:2.2 Elasticsearch:8.5,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
40
- common_dependencies[25]=" Composer:2.2 Elasticsearch:8.11,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
41
- common_dependencies[26]=" Composer:2.2 Elasticsearch:8.11,7.17 OpenSearch:2.12 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.12,3.11,3.9 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
42
- common_dependencies[27]=" Composer:2.2 Elasticsearch:8.11,7.17 OpenSearch:2.12 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.12 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
43
- common_dependencies[28]=" Composer:2.7 Elasticsearch:8.11 OpenSearch:2.12 MariaDB:10.6 MySQL:8.0 PHP:8.3,8.2 RabbitMQ:3.13 Redis:7.2 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.11.20 'AWS-ElastiCache':Redis7.0 'AWS-Elasticsearch':-- 'AWS-OpenSearch':2.11"
44
- common_dependencies[29]=" Composer:2.7 Elasticsearch:8.11 OpenSearch:2.12 MariaDB:10.6 MySQL:8.0 PHP:8.3,8.2 RabbitMQ:3.13 Redis:7.2 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.11.20 'AWS-ElastiCache':Redis7.0 'AWS-Elasticsearch':-- 'AWS-OpenSearch':2.11"
18
+ # Function to display version groups
19
+ show_version_groups () {
20
+ echo -e " ${BLUE} Available Magento version groups:${NC} "
21
+ echo " 1) 2.4.7.x (2.4.7, 2.4.7-p1, 2.4.7-p2, 2.4.7-p3)"
22
+ echo " 2) 2.4.6.x (2.4.6 through 2.4.6-p8)"
23
+ echo " 3) 2.4.5.x (2.4.5 through 2.4.5-p10)"
24
+ echo " 4) 2.4.4.x (2.4.4 through 2.4.4-p11)"
25
+ echo " 5) 2.4.3.x (2.4.3-p3)"
26
+ echo " 6) 2.4.2.x (2.4.2-p2)"
27
+ echo
28
+ }
45
29
46
- # Function to print available Magento versions
47
- print_magento_versions () {
48
- echo " Available Magento 2 versions:"
49
- for version in " ${magento_versions[@]} " ; do
50
- echo " $version "
51
- done
30
+ # Function to display requirements for a specific version group
31
+ show_requirements () {
32
+ local version_group=$1
33
+ echo -e " ${GREEN} System Requirements for Magento ${version_group} :${NC} "
34
+ echo -e " ${YELLOW} Required Components:${NC} "
35
+
36
+ case $version_group in
37
+ " 2.4.7.x" )
38
+ echo " • PHP: 8.3, 8.2"
39
+ echo " • Composer: 2.7"
40
+ echo " • Database:"
41
+ echo " - MySQL: 8.0"
42
+ echo " - MariaDB: 10.6"
43
+ echo " • Search: "
44
+ echo " - Elasticsearch: 8.11"
45
+ echo " - OpenSearch: 2.12"
46
+ echo " • Cache/Session:"
47
+ echo " - Redis: 7.2"
48
+ echo " • Message Queue:"
49
+ echo " - RabbitMQ: 3.13"
50
+ echo " • Web Server:"
51
+ echo " - Apache: 2.4"
52
+ echo " - Nginx: 1.24"
53
+ echo " • Varnish: 7.5"
54
+ echo -e " ${BLUE} Supported AWS Services:${NC} "
55
+ echo " • Aurora (MySQL): 8.0"
56
+ echo " • S3: ✔️"
57
+ echo " • MQ: 3.11.20"
58
+ echo " • ElastiCache: Redis7.0"
59
+ echo " • OpenSearch: 2.11"
60
+ ;;
61
+ " 2.4.6.x" )
62
+ echo " • PHP: 8.2, 8.1"
63
+ echo " • Composer: 2.2"
64
+ echo " • Database:"
65
+ echo " - MySQL: 8.0"
66
+ echo " - MariaDB: 10.6"
67
+ echo " • Search: "
68
+ echo " - Elasticsearch: 8.11, 7.17"
69
+ echo " - OpenSearch: 2.12"
70
+ echo " • Cache/Session:"
71
+ echo " - Redis: 7.0"
72
+ echo " • Message Queue:"
73
+ echo " - RabbitMQ: 3.13"
74
+ echo " • Web Server:"
75
+ echo " - Apache: 2.4"
76
+ echo " - Nginx: 1.24"
77
+ echo " • Varnish: 7.5"
78
+ echo -e " ${BLUE} Supported AWS Services:${NC} "
79
+ echo " • Aurora (MySQL): 8.0"
80
+ echo " • S3: ✔️"
81
+ echo " • MQ: 3.9.16"
82
+ echo " • ElastiCache: Redis6.2"
83
+ echo " • OpenSearch: 1.2"
84
+ ;;
85
+ " 2.4.5.x" )
86
+ echo " • PHP: 8.1"
87
+ echo " • Composer: 2.2"
88
+ echo " • Database:"
89
+ echo " - MySQL: 8.0"
90
+ echo " - MariaDB: 10.4"
91
+ echo " • Search: "
92
+ echo " - Elasticsearch: 7.17"
93
+ echo " - OpenSearch: 1.2"
94
+ echo " • Cache/Session:"
95
+ echo " - Redis: 6.2"
96
+ echo " • Message Queue:"
97
+ echo " - RabbitMQ: 3.11, 3.9"
98
+ echo " • Web Server:"
99
+ echo " - Apache: 2.4"
100
+ echo " - Nginx: 1.24"
101
+ echo " • Varnish: 7.3"
102
+ echo -e " ${BLUE} Supported AWS Services:${NC} "
103
+ echo " • Aurora (MySQL): 8.0"
104
+ echo " • S3: ✔️"
105
+ echo " • MQ: 3.9.13"
106
+ echo " • ElastiCache: Redis6"
107
+ echo " • OpenSearch: 1.2"
108
+ ;;
109
+ " 2.4.4.x" )
110
+ echo " • PHP: 8.1"
111
+ echo " • Composer: 2.2"
112
+ echo " • Database:"
113
+ echo " - MySQL: 8.0"
114
+ echo " - MariaDB: 10.4"
115
+ echo " • Search: "
116
+ echo " - Elasticsearch: 7.17"
117
+ echo " - OpenSearch: 1.2"
118
+ echo " • Cache/Session:"
119
+ echo " - Redis: 6.2"
120
+ echo " • Message Queue:"
121
+ echo " - RabbitMQ: 3.9"
122
+ echo " • Web Server:"
123
+ echo " - Apache: 2.4"
124
+ echo " - Nginx: 1.24"
125
+ echo " • Varnish: 7.3"
126
+ echo -e " ${YELLOW} NOTE: Supports MySQL 8.0.0 through 8.0.28 only${NC} "
127
+ echo -e " ${BLUE} Supported AWS Services:${NC} "
128
+ echo " • Aurora (MySQL): 8.0"
129
+ echo " • S3: ✔️"
130
+ echo " • MQ: 3.9.13"
131
+ echo " • ElastiCache: Redis6"
132
+ echo " • OpenSearch: 1.2"
133
+ ;;
134
+ " 2.4.3.x" )
135
+ echo " • PHP: 7.4"
136
+ echo " • Composer: 1"
137
+ echo " • Database:"
138
+ echo " - MySQL: 8.0"
139
+ echo " - MariaDB: 10.4"
140
+ echo " • Search: "
141
+ echo " - Elasticsearch: 7.16"
142
+ echo " - OpenSearch: 1.2"
143
+ echo " • Cache/Session:"
144
+ echo " - Redis: 6.0"
145
+ echo " • Message Queue:"
146
+ echo " - RabbitMQ: 3.8"
147
+ echo " • Web Server:"
148
+ echo " - Apache: 2.4"
149
+ echo " - Nginx: 1.18"
150
+ echo " • Varnish: 6.5"
151
+ echo -e " ${BLUE} Supported AWS Services:${NC} "
152
+ echo " • Aurora (MySQL): 5.7"
153
+ echo " • S3: ✔️"
154
+ echo " • MQ: 3.8.11"
155
+ echo " • ElastiCache: Redis6"
156
+ echo " • Elasticsearch: 7.9"
157
+ ;;
158
+ " 2.4.2.x" )
159
+ echo " • PHP: 7.4"
160
+ echo " • Composer: 1"
161
+ echo " • Database:"
162
+ echo " - MySQL: 8.0"
163
+ echo " - MariaDB: 10.4"
164
+ echo " • Search: "
165
+ echo " - Elasticsearch: 7.9"
166
+ echo " • Cache/Session:"
167
+ echo " - Redis: 6.0"
168
+ echo " • Message Queue:"
169
+ echo " - RabbitMQ: 3.8"
170
+ echo " • Web Server:"
171
+ echo " - Apache: 2.4"
172
+ echo " - Nginx: 1.18"
173
+ echo " • Varnish: 6.4"
174
+ echo -e " ${BLUE} Supported AWS Services:${NC} "
175
+ echo " • S3: ✔️"
176
+ echo " • Elasticsearch: 7.9"
177
+ ;;
178
+ * )
179
+ echo -e " ${RED} Version group not found${NC} "
180
+ ;;
181
+ esac
52
182
}
53
183
54
- # Function to print dependencies for a given Magento version
55
- print_dependencies () {
56
- local version=$1
57
- local index
58
- for (( index= 0 ; index< ${# magento_versions[@]} ; index++ )) ; do
59
- if [[ " ${magento_versions[$index]} " == " $version " ]]; then
60
- echo -e " ${GREEN} Recommended software dependencies:${NC} "
61
- local dependencies=${common_dependencies[$index]}
62
- IFS=' ' read -ra deps <<< " $dependencies"
63
- for dep in " ${deps[@]} " ; do
64
- echo " • $dep "
65
- done
66
- return
67
- fi
68
- done
69
- # If the provided Magento version is not recognized, prompt the user to choose a valid version
70
- echo -e " ${RED} Magento version not recognized. Please choose a valid version from the list below:${NC} "
71
- print_magento_versions
72
- echo -e " ${BLUE} Additional info about system requirements of Magento in the DevDocs at ${YELLOW} https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/system-requirements"
184
+ # Function to show additional information
185
+ show_additional_info () {
186
+ echo -e " ${BLUE} Additional Information:${NC} "
187
+ echo " • Full system requirements documentation: https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html"
188
+ echo " • Magento DevDocs: https://developer.adobe.com/commerce/docs/"
189
+ echo " • Security Best Practices: https://experienceleague.adobe.com/docs/commerce-operations/implementation-playbook/best-practices/security/overview.html"
73
190
}
74
191
75
- # Prompt the user to enter a Magento version and print its dependencies
76
- read -r -p " Enter the Magento 2 version you'd like to check dependencies on: " magento_version
192
+ # Main script execution
193
+ clear
194
+ show_header
77
195
78
- print_dependencies " $magento_version "
196
+ while true ; do
197
+ show_version_groups
198
+ echo -e " ${YELLOW} Options:${NC} "
199
+ echo " 1-6) Select version group"
200
+ echo " i) Additional Information"
201
+ echo " q) Quit"
202
+ echo
203
+ read -r -p " Enter your choice: " choice
204
+
205
+ case $choice in
206
+ q|Q)
207
+ echo -e " ${GREEN} Thank you for using the Magento System Requirements Checker!${NC} "
208
+ exit 0
209
+ ;;
210
+ i|I)
211
+ clear
212
+ show_additional_info
213
+ ;;
214
+ 1)
215
+ clear
216
+ show_requirements " 2.4.7.x"
217
+ ;;
218
+ 2)
219
+ clear
220
+ show_requirements " 2.4.6.x"
221
+ ;;
222
+ 3)
223
+ clear
224
+ show_requirements " 2.4.5.x"
225
+ ;;
226
+ 4)
227
+ clear
228
+ show_requirements " 2.4.4.x"
229
+ ;;
230
+ 5)
231
+ clear
232
+ show_requirements " 2.4.3.x"
233
+ ;;
234
+ 6)
235
+ clear
236
+ show_requirements " 2.4.2.x"
237
+ ;;
238
+ * )
239
+ echo -e " ${RED} Invalid choice. Please try again.${NC} "
240
+ ;;
241
+ esac
242
+
243
+ echo
244
+ read -r -p " Press Enter to continue..."
245
+ clear
246
+ done
0 commit comments