show errors in install script

This commit is contained in:
Andras Bacsai 2024-06-10 13:54:19 +02:00
parent 239f7fb35d
commit e08dc777df

View File

@ -6,7 +6,7 @@ set -e # Exit immediately if a command exits with a non-zero status
#set -u # Treat unset variables as an error and exit
set -o pipefail # Cause a pipeline to return the status of the last command that exited with a non-zero status
VERSION="1.3.2"
VERSION="1.3.3"
DOCKER_VERSION="26.0"
CDN="https://cdn.coollabs.io/coolify"
@ -35,7 +35,7 @@ fi
# Install xargs on Amazon Linux 2023 - lol
if [ "$OS_TYPE" = 'amzn' ]; then
dnf install -y findutils >/dev/null 2>&1
dnf install -y findutils >/dev/null
fi
LATEST_VERSION=$(curl --silent $CDN/versions.json | grep -i version | xargs | awk '{print $2}' | tr -d ',')
@ -75,28 +75,28 @@ echo "Installing required packages..."
case "$OS_TYPE" in
arch)
pacman -Sy >/dev/null 2>&1 || true
if ! pacman -Q curl wget git jq >/dev/null 2>&1; then
pacman -S --noconfirm curl wget git jq >/dev/null 2>&1 || true
pacman -Sy >/dev/null || true
if ! pacman -Q curl wget git jq >/dev/null; then
pacman -S --noconfirm curl wget git jq >/dev/null || true
fi
;;
ubuntu | debian | raspbian)
apt update -y >/dev/null 2>&1
apt install -y curl wget git jq >/dev/null 2>&1
apt update -y >/dev/null
apt install -y curl wget git jq >/dev/null
;;
centos | fedora | rhel | ol | rocky | almalinux | amzn)
if [ "$OS_TYPE" = "amzn" ]; then
dnf install -y wget git jq >/dev/null 2>&1
dnf install -y wget git jq >/dev/null
else
if ! command -v dnf >/dev/null 2>&1; then
yum install -y dnf >/dev/null 2>&1
if ! command -v dnf >/dev/null; then
yum install -y dnf >/dev/null
fi
dnf install -y curl wget git jq >/dev/null 2>&1
dnf install -y curl wget git jq >/dev/null
fi
;;
sles | opensuse-leap | opensuse-tumbleweed)
zypper refresh >/dev/null 2>&1
zypper install -y curl wget git jq >/dev/null 2>&1
zypper refresh >/dev/null
zypper install -y curl wget git jq >/dev/null
;;
*)
echo "This script only supports Debian, Redhat, Arch Linux, or SLES based operating systems for now."