diff --git a/configs/releng/airootfs/usr/local/bin/fws-update b/configs/releng/airootfs/usr/local/bin/fws-update index c8acd4a..862a35c 100755 --- a/configs/releng/airootfs/usr/local/bin/fws-update +++ b/configs/releng/airootfs/usr/local/bin/fws-update @@ -8,26 +8,28 @@ if [ "$(id -u)" -ne 0 ]; then exec sudo "$0" "$@" fi -say "Mise à jour du système (pacman -Syu)…" -pacman -Syu || { echo "Échec de la mise à jour (réseau ?)"; read -rp "Entrée pour fermer. " _; exit 1; } +. /usr/local/lib/fws/i18n.sh update common + +say "$(t update.updating_system)" +pacman -Syu || { echo "$(t update.failed)"; read -rp "$(t common.press_enter_to_close) " _; exit 1; } if command -v paccache >/dev/null 2>&1; then - say "Nettoyage du cache des paquets (2 dernières versions gardées)…" + say "$(t update.cleaning_cache)" paccache -rk2 fi ORPHANS="$(pacman -Qtdq 2>/dev/null)" if [ -n "$ORPHANS" ]; then - say "Paquets orphelins (plus requis par rien) :" + say "$(t update.orphans)" echo "$ORPHANS" - read -rp "Les supprimer ? [o/N] " _rm - case "$_rm" in o|O|oui) echo "$ORPHANS" | pacman -Rns --noconfirm - ;; esac + read -rp "$(t update.remove_orphans) $(t common.yes_no) " _rm + t_is_yes "$_rm" && echo "$ORPHANS" | pacman -Rns --noconfirm - fi if command -v flatpak >/dev/null 2>&1; then - say "Mise à jour des Flatpaks…" + say "$(t update.updating_flatpaks)" flatpak update -y || true fi -say "Système à jour ✔" -read -rp "Entrée pour fermer. " _ +say "$(t update.done)" +read -rp "$(t common.press_enter_to_close) " _