From 63b30b695389e94b540c5577bb23394aa6aa8435 Mon Sep 17 00:00:00 2001 From: MDietermann Date: Thu, 9 Apr 2026 08:07:09 +0200 Subject: [PATCH 1/5] Changed tio installation --- bootstrap.sh | 53 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index f5baea8..1009676 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -13,10 +13,13 @@ YELLOW='\033[1;33m' RED='\033[0;31m' NC='\033[0m' -info() { echo -e "${GREEN}[✓]${NC} $1"; } -warn() { echo -e "${YELLOW}[!]${NC} $1"; } -error() { echo -e "${RED}[✗]${NC} $1"; exit 1; } -step() { echo -e "\n${GREEN}━━━ $1 ━━━${NC}"; } +info() { echo -e "${GREEN}[✓]${NC} $1"; } +warn() { echo -e "${YELLOW}[!]${NC} $1"; } +error() { + echo -e "${RED}[✗]${NC} $1" + exit 1 +} +step() { echo -e "\n${GREEN}━━━ $1 ━━━${NC}"; } # ── Detect environment ────────────────────────────────────────── IS_WSL=false @@ -49,7 +52,15 @@ 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 tio + $PKG_INSTALL base-devel git curl unzip wget ripgrep fd bat eza tree jq zsh clang + # tio is in AUR — install yay if needed, then tio + if ! command -v yay &>/dev/null; then + info "Installing yay (AUR helper)..." + git clone https://aur.archlinux.org/yay.git /tmp/yay + (cd /tmp/yay && makepkg -si --noconfirm) + rm -rf /tmp/yay + fi + 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 @@ -62,8 +73,8 @@ info "Base packages installed" step "2/9 — Setting up Zsh" if [[ ! -d "$HOME/.oh-my-zsh" ]]; then - RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" || \ - RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -kfsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" || + RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -kfsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" info "Oh My Zsh installed" else info "Oh My Zsh already present" @@ -71,10 +82,10 @@ fi ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}" -[[ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ]] && \ +[[ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ]] && git clone https://github.com/zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions" -[[ ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ]] && \ +[[ ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ]] && git clone https://github.com/zsh-users/zsh-syntax-highlighting "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" info "Zsh plugins installed" @@ -92,7 +103,7 @@ fi info "Starship installed" mkdir -p ~/.config -cat > ~/.config/starship.toml << 'STARSHIP' +cat >~/.config/starship.toml <<'STARSHIP' palette = "gruvbox_dark" format = """$directory$git_branch$git_status$character""" @@ -137,7 +148,7 @@ info "Zellij installed" mkdir -p ~/.config/zellij/layouts -cat > ~/.config/zellij/config.kdl << 'ZELLIJ_CFG' +cat >~/.config/zellij/config.kdl <<'ZELLIJ_CFG' theme "gruvbox-dark" default_layout "default" default_mode "normal" @@ -175,7 +186,7 @@ themes { } ZELLIJ_CFG -cat > ~/.config/zellij/layouts/arduino.kdl << 'LAYOUT' +cat >~/.config/zellij/layouts/arduino.kdl <<'LAYOUT' layout { tab name="code" focus=true { pane split_direction="vertical" { @@ -238,7 +249,7 @@ fi mkdir -p ~/.config/nvim/lua/plugins -cat > ~/.config/nvim/lua/plugins/gruvbox.lua << 'LUA' +cat >~/.config/nvim/lua/plugins/gruvbox.lua <<'LUA' return { { "ellisonleao/gruvbox.nvim", @@ -254,7 +265,7 @@ return { } LUA -cat > ~/.config/nvim/lua/plugins/arduino.lua << 'LUA' +cat >~/.config/nvim/lua/plugins/arduino.lua <<'LUA' return { { "stevearc/vim-arduino", @@ -281,7 +292,7 @@ return { } LUA -cat > ~/.config/nvim/lua/plugins/lsp.lua << 'LUA' +cat >~/.config/nvim/lua/plugins/lsp.lua <<'LUA' return { { "neovim/nvim-lspconfig", @@ -350,7 +361,7 @@ fi info "Lazygit installed" mkdir -p ~/.config/lazygit -cat > ~/.config/lazygit/config.yml << 'LAZYGIT' +cat >~/.config/lazygit/config.yml <<'LAZYGIT' gui: theme: activeBorderColor: @@ -372,7 +383,7 @@ step "9/9 — Creating project scaffolding tool" mkdir -p ~/.local/bin ~/.config/archduino/templates -cat > ~/.local/bin/arduino-new << 'SCAFFOLD' +cat >~/.local/bin/arduino-new <<'SCAFFOLD' #!/bin/bash set -e @@ -441,7 +452,7 @@ SCAFFOLD chmod +x ~/.local/bin/arduino-new # Templates -cat > ~/.config/archduino/templates/default.ino << 'INO' +cat >~/.config/archduino/templates/default.ino <<'INO' void setup() { Serial.begin(115200); while (!Serial) { ; } @@ -453,7 +464,7 @@ void loop() { } INO -cat > ~/.config/archduino/templates/esp32.ino << 'INO' +cat >~/.config/archduino/templates/esp32.ino <<'INO' #include const char* ssid = "YOUR_SSID"; @@ -478,7 +489,7 @@ void loop() { } INO -cat > ~/.config/archduino/templates/esp8266.ino << 'INO' +cat >~/.config/archduino/templates/esp8266.ino <<'INO' #include const char* ssid = "YOUR_SSID"; @@ -509,7 +520,7 @@ step "Finalizing shell config" # Append archduino block to .zshrc if not already present if ! grep -q "ARCHDUINO" ~/.zshrc 2>/dev/null; then - cat >> ~/.zshrc << 'ZSHRC' + cat >>~/.zshrc <<'ZSHRC' # ── ARCHDUINO CONFIG ──────────────────────────────────────────── plugins=(git zsh-autosuggestions zsh-syntax-highlighting) From fca8ad8444c9ad832d4bf02e28004618a6d22894 Mon Sep 17 00:00:00 2001 From: MDietermann Date: Thu, 9 Apr 2026 08:15:58 +0200 Subject: [PATCH 2/5] Fixed permission error for arduino-cli --- bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 1009676..defe3f7 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -318,7 +318,7 @@ info "LazyVim plugins configured (Gruvbox + Arduino + LSP)" step "7/9 — Installing Arduino CLI + board cores" if ! command -v arduino-cli &>/dev/null; then - curl -kfsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh + curl -kfsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sudo sh fi info "Arduino CLI installed: $(arduino-cli version 2>/dev/null | head -1)" From 9b0fcde4b66451dc9f2130eea6db0e2c1ccde8dd Mon Sep 17 00:00:00 2001 From: MDietermann Date: Thu, 9 Apr 2026 08:22:00 +0200 Subject: [PATCH 3/5] Arduino-CLI now gets pulled from pacman --- bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index defe3f7..ac577d4 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -318,6 +318,8 @@ info "LazyVim plugins configured (Gruvbox + Arduino + LSP)" step "7/9 — Installing Arduino CLI + board cores" if ! command -v arduino-cli &>/dev/null; then + if $IS_ARCH then; + $PKG_INSTALL arduino-cli curl -kfsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sudo sh fi info "Arduino CLI installed: $(arduino-cli version 2>/dev/null | head -1)" From 05e68cf24fb11538be95576217ae775801fccd2a Mon Sep 17 00:00:00 2001 From: MDietermann Date: Thu, 9 Apr 2026 08:23:30 +0200 Subject: [PATCH 4/5] Arduino-CLI now gets pulled from pacman --- bootstrap.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index ac577d4..2b8f820 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -320,7 +320,9 @@ step "7/9 — Installing Arduino CLI + board cores" if ! command -v arduino-cli &>/dev/null; then if $IS_ARCH then; $PKG_INSTALL arduino-cli - curl -kfsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sudo sh + else + curl -kfsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sudo sh + fi fi info "Arduino CLI installed: $(arduino-cli version 2>/dev/null | head -1)" From 91e113498256a6af80ca86cf18c74ff83f672a82 Mon Sep 17 00:00:00 2001 From: MDietermann Date: Thu, 9 Apr 2026 08:25:46 +0200 Subject: [PATCH 5/5] Arduino-CLI now gets pulled from pacman --- bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 2b8f820..9088e1e 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -318,8 +318,8 @@ info "LazyVim plugins configured (Gruvbox + Arduino + LSP)" step "7/9 — Installing Arduino CLI + board cores" if ! command -v arduino-cli &>/dev/null; then - if $IS_ARCH then; - $PKG_INSTALL arduino-cli + 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 fi