Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update install.sh #11

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ then echo "Please run as root"
exit
fi


# List of supported distributions
#supported_distros=("Ubuntu" "Debian" "Fedora" "CentOS" "Arch")
supported_distros=("Ubuntu")
# Get the distribution name and version
if [[ -f "/etc/os-release" ]]; then
source "/etc/os-release"
distro_name=$NAME
distro_version=$VERSION_ID
else
echo "Unable to determine distribution."
exit 1
fi
# Check if the distribution is supported
if [[ " ${supported_distros[@]} " =~ " ${distro_name} " ]]; then
echo "Your Linux distribution is ${distro_name} ${distro_version}. It is supported."
: #no-op command
else
# Print error message in red
echo -e "\e[31mYour Linux distribution (${distro_name} ${distro_version}) is not currently supported.\e[0m"
exit 1
fi


# php7.x is End of life https://www.php.net/supported-versions.php ubuntu bellow 20 is not supported by php8.1 in 2023
if [ "$(uname)" == "Linux" ]; then
version_info=$(lsb_release -rs)
Expand Down
Loading