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
This commit is contained in:
@@ -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)"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user