fix: setup.sh installs curl + git + go for all package managers

This commit is contained in:
admin 2026-08-03 10:38:36 +00:00
parent 0e781b157e
commit e62efa5534

View file

@ -27,14 +27,22 @@ trap cleanup EXIT
echo -e "${BOLD}Wallarm Bootstrap${NC}" echo -e "${BOLD}Wallarm Bootstrap${NC}"
# ── Prerequisites ───────────────────────────────────────────────────── # ── Prerequisites ─────────────────────────────────────────────────────
if ! command -v git >/dev/null 2>&1; then install_deps() {
apt-get update -qq 2>/dev/null && apt-get install -y -qq git 2>/dev/null || true if command -v apt-get >/dev/null 2>&1; then
apt-get update -qq
apt-get install -y -qq curl git golang-go 2>/dev/null
elif command -v yum >/dev/null 2>&1; then
yum install -y -q curl git golang 2>/dev/null
elif command -v dnf >/dev/null 2>&1; then
dnf install -y -q curl git golang 2>/dev/null
elif command -v apk >/dev/null 2>&1; then
apk add --no-cache curl git go 2>/dev/null
fi fi
if ! command -v go >/dev/null 2>&1; then
echo -e "${YELLOW}Installing Go...${NC}"
apt-get update -qq 2>/dev/null && apt-get install -y -qq golang-go 2>/dev/null || {
echo -e "${RED}Install Go 1.21+ manually.${NC}"; exit 1
} }
if ! command -v curl >/dev/null 2>&1 || ! command -v git >/dev/null 2>&1 || ! command -v go >/dev/null 2>&1; then
echo -e "${YELLOW}Installing dependencies...${NC}"
install_deps
fi fi
echo -e "${GREEN}git $(git --version | cut -d' ' -f3) go $(go version | cut -d' ' -f3)${NC}" echo -e "${GREEN}git $(git --version | cut -d' ' -f3) go $(go version | cut -d' ' -f3)${NC}"