-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_php_versions.sh
More file actions
executable file
·43 lines (33 loc) · 1.26 KB
/
install_php_versions.sh
File metadata and controls
executable file
·43 lines (33 loc) · 1.26 KB
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
#!/bin/bash
source ./app/show_progress.sh
install_php_versions() {
local versions_to_inst="$1"
local installed_php_vers="$2"
local total_steps=5
local current_step=0
{
current_step=$((current_step + 1))
show_progress "$current_step" "$total_steps"
echo "### Updating system packages..."
sudo apt -qq update
current_step=$((current_step + 1))
show_progress "$current_step" "$total_steps"
echo "### Installing required packages..."
sudo apt -qq install lsb-release ca-certificates apt-transport-https software-properties-common -y
current_step=$((current_step + 1))
show_progress "$current_step" "$total_steps"
echo "### Adding PHP repository..."
# sudo add-apt-repository ppa:ondrej/php -y
sudo apt -qq update
current_step=$((current_step + 1))
show_progress "$current_step" "$total_steps"
echo "### Installing selected PHP versions..."
# for version in $versions; do
# sudo apt install php$version -y
# done
current_step=$((current_step + 1))
show_progress "$current_step" "$total_steps"
echo "### Installation complete!"
}
}
install_php_versions