diff --git a/install.sh b/install.sh index 0eab51e..4055dbd 100644 --- a/install.sh +++ b/install.sh @@ -32,6 +32,22 @@ fatal() { exit 1 } +# Source the os-release file to get distribution info +if [ -f /etc/os-release ]; then + . /etc/os-release + OS=$ID +else + fatal "Cannot determine OS" + exit 1 +fi + +# Check if OS is Debian, AlmaLinux (almalinux or alma), or Ubuntu +if [[ "$OS" != "debian" && "$OS" != "ubuntu" && "$OS" != "almalinux" && "$OS" != "alma" ]]; then + debug "Unsupported OS: $OS" + fatal "This script only supports Debian, AlmaLinux, or Ubuntu" + exit 1 +fi + install_dependencies () { info "Checking dependencies..."