diff --git a/private_dot_local/bin/executable_update b/private_dot_local/bin/executable_update index eb2acca..f1ff87f 100644 --- a/private_dot_local/bin/executable_update +++ b/private_dot_local/bin/executable_update @@ -5,7 +5,7 @@ set -u FAILED=0 STATUS_APT="not_detected" -APT=() +COMMAND_APT=() STATUS_BREW="not_detected" STATUS_CHEZMOI="not_detected" STATUS_MISE="not_detected" @@ -78,32 +78,32 @@ if [[ -f /etc/os-release ]]; then # pour saisir le mot de passe ; sinon (par exemple compte sans sudo d'un # bac à sable) la section est ignorée if ((EUID == 0)); then - APT=(apt) + COMMAND_APT=(apt) elif sudo -n true 2>/dev/null || { [[ -t 0 ]] && id -nG | grep -qwE 'sudo|admin|wheel'; }; then - APT=(sudo apt) + COMMAND_APT=(sudo apt) else STATUS_APT="skipped" fi fi fi -if ((${#APT[@]})); then +if ((${#COMMAND_APT[@]})); then STATUS_APT="success" echo_info "APT" run APT "Mise à jour des paquets" \ - "${APT[@]}" update || true + "${COMMAND_APT[@]}" update || true run APT "Mise à niveau des paquets" \ - "${APT[@]}" upgrade -y || true + "${COMMAND_APT[@]}" upgrade -y || true run APT "Suppression des paquets inutiles" \ - "${APT[@]}" autoremove -y || true + "${COMMAND_APT[@]}" autoremove -y || true run APT "Nettoyage du cache" \ - "${APT[@]}" autoclean || true + "${COMMAND_APT[@]}" autoclean || true fi # ---------------------------------------------------------------------- diff --git a/run_once_after_00-install-mise.sh.tmpl b/run_once_after_00-install-mise.sh.tmpl index d8ebab7..6737abe 100644 --- a/run_once_after_00-install-mise.sh.tmpl +++ b/run_once_after_00-install-mise.sh.tmpl @@ -16,13 +16,14 @@ if ! command -v mise &>/dev/null; then export PATH="${HOME}/.local/bin:$PATH" fi -# 2. Lancer le bootstrap (paquets système : droits sudo requis) +# 2. Lancer le bootstrap : il peut exiger sudo (paquets système, etc.) ; faute +# de pouvoir n'en exécuter qu'une partie, il est ignoré sans droits sudo if command -v mise &>/dev/null; then if can_sudo; then echo "🚀 Mise bootstrap..." mise bootstrap --yes else - echo "⚠️ Pas de droits sudo : mise bootstrap ignoré (paquets système non installés)." + echo "⚠️ Pas de droits sudo : mise bootstrap ignoré." fi fi diff --git a/run_onchange_after_mise-install.sh.tmpl b/run_onchange_after_mise-install.sh.tmpl index f05e95d..faf43d7 100644 --- a/run_onchange_after_mise-install.sh.tmpl +++ b/run_onchange_after_mise-install.sh.tmpl @@ -61,15 +61,16 @@ MISE_TOOLBOX_EOF {{- end }} if command -v mise &>/dev/null; then - # Paquets système (apt) du bootstrap : droits sudo requis - # (sinon, par exemple compte sans sudo d'un bac à sable, on les ignore) + # Le bootstrap peut exiger sudo (paquets système, etc.) : faute de pouvoir + # n'en exécuter qu'une partie, il est ignoré sans droits sudo (par exemple + # compte sans sudo d'un bac à sable) if can_sudo; then echo echo "🚀 Mise bootstrap..." mise bootstrap --yes else echo - echo "⚠️ Pas de droits sudo : mise bootstrap ignoré (paquets système non installés)." + echo "⚠️ Pas de droits sudo : mise bootstrap ignoré." fi echo