onchange script debug set opt, smarter micro installer

This commit is contained in:
2024-11-07 15:19:50 -06:00
parent 2750d82df1
commit 44fb8d9e48

View File

@@ -1,6 +1,6 @@
{{ if eq .chezmoi.os "linux" -}}
#!/bin/bash
set -eu
set -xeu
# This script is intended to be idempotent and should be safe to run multiple times.
# No custom packages should be expected to be installed by default.
@@ -19,8 +19,12 @@ if ! type -P zsh; then
fi
# Install micro (+ register as text editor)
curl https://getmic.ro/r | sudo sh && sudo mv ./micro /usr/bin
sudo apt remove -y micro
if ! type -P micro; then
echo "chezmoi: Installing micro"
sudo apt remove -y micro
curl https://getmic.ro/r | sudo sh
sudo mv ./micro /usr/bin/micro
fi
# libpq-dev libssh-dev libsqlite3-dev
echo "chezmoi: Installing apt packages"