From c9f304a5399b45e52333f8a6ce56056b638de984 Mon Sep 17 00:00:00 2001 From: "marvin.dietermann" Date: Fri, 10 Apr 2026 12:06:57 +0200 Subject: [PATCH] feat(install): improve Arduino CLI installation and add ca-certificates dependency - Replace shell script installation with direct download approach for better reliability - Use GitHub API to get latest Arduino CLI version automatically - Add proper cleanup of temporary files after installation - Include ca-certificates package in Arch Linux base packages for secure connections - Maintain backward compatibility with existing installation flow --- lib/arduino.sh | 6 +++++- lib/packages.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/arduino.sh b/lib/arduino.sh index e6701ee..1660694 100644 --- a/lib/arduino.sh +++ b/lib/arduino.sh @@ -6,7 +6,11 @@ step "7/9 — Installing Arduino CLI + board cores" if $IS_ARCH; then $PKG_INSTALL arduino-cli else - curl -kfsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sudo sh + ACLI_VERSION=$(curl -ks "https://api.github.com/repos/arduino/arduino-cli/releases/latest" | jq -r '.tag_name' | sed 's/v//') + curl -ksSLo /tmp/arduino-cli.tar.gz "https://downloads.arduino.cc/arduino-cli/arduino-cli_${ACLI_VERSION}_Linux_64bit.tar.gz" + tar xzf /tmp/arduino-cli.tar.gz -C /tmp arduino-cli + sudo install -m 755 /tmp/arduino-cli /usr/local/bin/arduino-cli + rm -f /tmp/arduino-cli /tmp/arduino-cli.tar.gz fi info "Arduino CLI installed: $(arduino-cli version 2>/dev/null | head -1)" diff --git a/lib/packages.sh b/lib/packages.sh index 25a3f3b..4a551b9 100644 --- a/lib/packages.sh +++ b/lib/packages.sh @@ -5,7 +5,7 @@ step "1/9 — Installing base packages" if $IS_ARCH; then sudo pacman -Syu --noconfirm - $PKG_INSTALL base-devel git curl unzip wget ripgrep fd bat eza tree jq zsh clang + $PKG_INSTALL base-devel git curl unzip wget ripgrep fd bat eza tree jq zsh clang ca-certificates # tio is in AUR — install yay if needed, then tio if ! command -v yay &>/dev/null; then info "Installing yay (AUR helper)..." @@ -16,7 +16,7 @@ if $IS_ARCH; then yay -S --needed --noconfirm tio else sudo apt update && sudo apt upgrade -y - $PKG_INSTALL build-essential git curl unzip wget ripgrep bat eza tree jq zsh clang-format tio + $PKG_INSTALL build-essential git curl unzip wget ripgrep bat eza tree jq zsh clang-format tio ca-certificates # fd is named differently on Ubuntu sudo apt install -y fd-find 2>/dev/null || true fi