refactor(install): improve modular architecture and error handling

- Remove redundant installation checks in arduino.sh, git.sh
- Add bash shell enforcement in install.sh to prevent compatibility issues
- Streamline Arduino CLI installation logic for both Arch and other systems
- Improve Git and Lazygit installation messaging consistency
- Update install usage instructions for better clarity
- Enhance shell compatibility by enforcing bash execution
This commit is contained in:
marvin.dietermann
2026-04-10 11:51:03 +02:00
parent ee0b7f5009
commit 040839862d
9 changed files with 125 additions and 69 deletions

View File

@@ -3,18 +3,17 @@
step "8/9 — Setting up Git + Lazygit"
if ! command -v lazygit &>/dev/null; then
if $IS_ARCH; then
$PKG_INSTALL lazygit
else
LAZYGIT_VERSION=$(curl -ks "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | jq -r '.tag_name' | sed 's/v//')
curl -kLo /tmp/lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf /tmp/lazygit.tar.gz -C /tmp lazygit
sudo mv /tmp/lazygit /usr/local/bin/
fi
if $IS_ARCH; then
$PKG_INSTALL lazygit
else
LAZYGIT_VERSION=$(curl -ks "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | jq -r '.tag_name' | sed 's/v//')
curl -kLo /tmp/lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf /tmp/lazygit.tar.gz -C /tmp lazygit
sudo mv /tmp/lazygit /usr/local/bin/
fi
info "Lazygit installed"
info "Lazygit installed/updated"
mkdir -p ~/.config/lazygit
backup_config ~/.config/lazygit/config.yml
write_lazygit_config ~/.config/lazygit/config.yml
info "Lazygit configured with $THEME_DISPLAY_NAME"