Made installation script output the install for jq and curl if theres any issues with repos rathet than just exiting

This commit is contained in:
Muhammad Ibrahim
2025-10-01 10:52:08 +01:00
parent 02f9899b23
commit 42f882c1c6

View File

@@ -133,23 +133,23 @@ info "📦 Installing required dependencies..."
# Detect package manager and install jq and curl # Detect package manager and install jq and curl
if command -v apt-get >/dev/null 2>&1; then if command -v apt-get >/dev/null 2>&1; then
# Debian/Ubuntu # Debian/Ubuntu
apt-get update >/dev/null 2>&1 apt-get update
apt-get install -y jq curl >/dev/null 2>&1 apt-get install jq curl -y
elif command -v yum >/dev/null 2>&1; then elif command -v yum
# CentOS/RHEL 7 # CentOS/RHEL 7
yum install -y jq curl >/dev/null 2>&1 yum install -y jq curl
elif command -v dnf >/dev/null 2>&1; then elif command -v dnf
# CentOS/RHEL 8+/Fedora # CentOS/RHEL 8+/Fedora
dnf install -y jq curl >/dev/null 2>&1 dnf install -y jq curl
elif command -v zypper >/dev/null 2>&1; then elif command -v zypper
# openSUSE # openSUSE
zypper install -y jq curl >/dev/null 2>&1 zypper install -y jq curl
elif command -v pacman >/dev/null 2>&1; then elif command -v pacman
# Arch Linux # Arch Linux
pacman -S --noconfirm jq curl >/dev/null 2>&1 pacman -S --noconfirm jq curl
elif command -v apk >/dev/null 2>&1; then elif command -v apk
# Alpine Linux # Alpine Linux
apk add --no-cache jq curl >/dev/null 2>&1 apk add --no-cache jq curl
else else
warning "Could not detect package manager. Please ensure 'jq' and 'curl' are installed manually." warning "Could not detect package manager. Please ensure 'jq' and 'curl' are installed manually."
fi fi