diff --git a/mint/linux_mint.sh b/mint/linux_mint.sh index c3e0037..7cb7968 100755 --- a/mint/linux_mint.sh +++ b/mint/linux_mint.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# execute self with sudo if user is not root +# Execute itself with sudo if user is not root. [[ $UID -ne 0 ]] && exec sudo ./"$0" ### @@ -10,7 +10,7 @@ export DEBIAN_FRONTEND=noninteractive DPKG_CFG_FRAGMENT=/etc/dpkg/dpkg.cfg.d/non-interactive # Linux distro -script_distro='Linux Mint 20.3 (Cinnamon Edition)' +script_distro='Linux Mint 21' # Additional packages packages=( @@ -124,22 +124,23 @@ packages=( # Functions ### -# $*: message to echo +# $*: message to echo. e() { printf "\e[31m>>>\e[0m %s\n" "$*" } -# It's a pain to stop (ctrl+c, kill) execution with all the Python applications -# so we catch SIGINT and SIGTERM and exit immediately +# It's a pain to stop execution (CTRL+C, kill) with all the Python applications +# so we catch SIGINT and SIGTERM and exit immediately. handle_signal() { e "Ausführung abgebrochen! Skript wird beendet." exit 1 } -# always executed on shell exit regardless of reason. for cleanup tasks +# Always executed when exiting the shell, regardless of the reason. handle_exit() { - e "Finales Cleanup wird durchgeführt …" + e "Finale Aufräumarbeiten werden durchgeführt …" rm -f "$DPKG_CFG_FRAGMENT" + rm -f /etc/apt/apt.conf.d/01aptproxy } trap handle_signal SIGINT SIGTERM @@ -160,21 +161,21 @@ echo "\ ### # Maintainer: Computertruhe e. V. # Website: https://computertruhe.de/ -# Version: 1.2.0 +# Version: 2.0.0 # Repo: https://codeberg.org/Computertruhe/Setup-Skripte # Distro: ${script_distro} ### " e "Starte initiales Setup für Rechner mit frisch installiertem '${script_distro}' …" -# apt proxy benutzen (bedingt = wenn da) +# Use APT proxy if available. ping -c 1 apt-proxy if [ "$?" -eq "0" ]; then + e "Nutze APT-Proxy." echo 'Acquire::https::Proxy "http://apt-proxy:3142";' > /etc/apt/apt.conf.d/01aptproxy echo 'Acquire::http::Proxy "http://apt-proxy:3142";' >> /etc/apt/apt.conf.d/01aptproxy - e "Proxy Apt-Aktiv" else - e "Kein Apt-Proxy" + e "Kein APT-Proxy gefunden." fi echo 'Dpkg::Options "--force-unsafe-io";' >> /etc/apt/apt.conf.d/01aptproxy @@ -182,7 +183,7 @@ echo 'Dpkg::Options "--force-unsafe-io";' >> /etc/apt/apt.conf.d/01aptproxy ### # Automatic installation ### -# place temporary dpkg configurations to ensure non-interactive upgrade +# Place temporary dpkg configurations to ensure non-interactive upgrade. cat <<'DPKG' >"$DPKG_CFG_FRAGMENT" force-confold force-confdef @@ -203,7 +204,7 @@ mintupdate-cli --yes upgrade e "Proprietäre Treiber installieren (sofern verfügbar) …" ubuntu-drivers autoinstall -e "Multimediacodecs installieren" +e "Multimedia-Codecs installieren …" pkg mint-meta-codecs e "Zusätzliche Software installieren …" @@ -213,17 +214,11 @@ e "Sprachunterstützung vervollständigen …" pkg $(check-language-support) pkg fonts-arabeyes -# these packages have to be installed after "$(check-language-support)" +# These packages have to be installed after "$(check-language-support)". pkg hunspell-de-at hunspell-de-ch hunspell-de-de hunspell-uk hunspell-ru e "Unnötige Pakete entfernen und Cache bereinigen …" apt clean --yes --quiet apt autoremove --yes --quiet -### -# Finalisation -### -e "Apt proxy wieder entfernen..." -rm /etc/apt/apt.conf.d/01aptproxy - e "Initiales Setup beendet."