mirror of
https://codeberg.org/Computertruhe/Setup-Skripte.git
synced 2024-06-01 16:16:29 +02:00
Update linux_mint.sh
- updated distro version number and removed edition because the script runs on both supported desktop environments (Cinnamon and XFCE) - a bunch of mostly cosmetical changes
This commit is contained in:
parent
174ba04ed0
commit
126dff80e8
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/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"
|
[[ $UID -ne 0 ]] && exec sudo ./"$0"
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -10,7 +10,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
DPKG_CFG_FRAGMENT=/etc/dpkg/dpkg.cfg.d/non-interactive
|
DPKG_CFG_FRAGMENT=/etc/dpkg/dpkg.cfg.d/non-interactive
|
||||||
|
|
||||||
# Linux distro
|
# Linux distro
|
||||||
script_distro='Linux Mint 20.3 (Cinnamon Edition)'
|
script_distro='Linux Mint 21'
|
||||||
|
|
||||||
# Additional packages
|
# Additional packages
|
||||||
packages=(
|
packages=(
|
||||||
|
@ -124,22 +124,23 @@ packages=(
|
||||||
# Functions
|
# Functions
|
||||||
###
|
###
|
||||||
|
|
||||||
# $*: message to echo
|
# $*: message to echo.
|
||||||
e() {
|
e() {
|
||||||
printf "\e[31m>>>\e[0m %s\n" "$*"
|
printf "\e[31m>>>\e[0m %s\n" "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
# It's a pain to stop (ctrl+c, kill) execution with all the Python applications
|
# It's a pain to stop execution (CTRL+C, kill) with all the Python applications
|
||||||
# so we catch SIGINT and SIGTERM and exit immediately
|
# so we catch SIGINT and SIGTERM and exit immediately.
|
||||||
handle_signal() {
|
handle_signal() {
|
||||||
e "Ausführung abgebrochen! Skript wird beendet."
|
e "Ausführung abgebrochen! Skript wird beendet."
|
||||||
exit 1
|
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() {
|
handle_exit() {
|
||||||
e "Finales Cleanup wird durchgeführt …"
|
e "Finale Aufräumarbeiten werden durchgeführt …"
|
||||||
rm -f "$DPKG_CFG_FRAGMENT"
|
rm -f "$DPKG_CFG_FRAGMENT"
|
||||||
|
rm -f /etc/apt/apt.conf.d/01aptproxy
|
||||||
}
|
}
|
||||||
|
|
||||||
trap handle_signal SIGINT SIGTERM
|
trap handle_signal SIGINT SIGTERM
|
||||||
|
@ -160,21 +161,21 @@ echo "\
|
||||||
###
|
###
|
||||||
# Maintainer: Computertruhe e. V.
|
# Maintainer: Computertruhe e. V.
|
||||||
# Website: https://computertruhe.de/
|
# Website: https://computertruhe.de/
|
||||||
# Version: 1.2.0
|
# Version: 2.0.0
|
||||||
# Repo: https://codeberg.org/Computertruhe/Setup-Skripte
|
# Repo: https://codeberg.org/Computertruhe/Setup-Skripte
|
||||||
# Distro: ${script_distro}
|
# Distro: ${script_distro}
|
||||||
###
|
###
|
||||||
"
|
"
|
||||||
e "Starte initiales Setup für Rechner mit frisch installiertem '${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
|
ping -c 1 apt-proxy
|
||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
|
e "Nutze APT-Proxy."
|
||||||
echo 'Acquire::https::Proxy "http://apt-proxy:3142";' > /etc/apt/apt.conf.d/01aptproxy
|
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
|
echo 'Acquire::http::Proxy "http://apt-proxy:3142";' >> /etc/apt/apt.conf.d/01aptproxy
|
||||||
e "Proxy Apt-Aktiv"
|
|
||||||
else
|
else
|
||||||
e "Kein Apt-Proxy"
|
e "Kein APT-Proxy gefunden."
|
||||||
fi
|
fi
|
||||||
echo 'Dpkg::Options "--force-unsafe-io";' >> /etc/apt/apt.conf.d/01aptproxy
|
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
|
# 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"
|
cat <<'DPKG' >"$DPKG_CFG_FRAGMENT"
|
||||||
force-confold
|
force-confold
|
||||||
force-confdef
|
force-confdef
|
||||||
|
@ -203,7 +204,7 @@ mintupdate-cli --yes upgrade
|
||||||
e "Proprietäre Treiber installieren (sofern verfügbar) …"
|
e "Proprietäre Treiber installieren (sofern verfügbar) …"
|
||||||
ubuntu-drivers autoinstall
|
ubuntu-drivers autoinstall
|
||||||
|
|
||||||
e "Multimediacodecs installieren"
|
e "Multimedia-Codecs installieren …"
|
||||||
pkg mint-meta-codecs
|
pkg mint-meta-codecs
|
||||||
|
|
||||||
e "Zusätzliche Software installieren …"
|
e "Zusätzliche Software installieren …"
|
||||||
|
@ -213,17 +214,11 @@ e "Sprachunterstützung vervollständigen …"
|
||||||
pkg $(check-language-support)
|
pkg $(check-language-support)
|
||||||
pkg fonts-arabeyes
|
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
|
pkg hunspell-de-at hunspell-de-ch hunspell-de-de hunspell-uk hunspell-ru
|
||||||
|
|
||||||
e "Unnötige Pakete entfernen und Cache bereinigen …"
|
e "Unnötige Pakete entfernen und Cache bereinigen …"
|
||||||
apt clean --yes --quiet
|
apt clean --yes --quiet
|
||||||
apt autoremove --yes --quiet
|
apt autoremove --yes --quiet
|
||||||
|
|
||||||
###
|
|
||||||
# Finalisation
|
|
||||||
###
|
|
||||||
e "Apt proxy wieder entfernen..."
|
|
||||||
rm /etc/apt/apt.conf.d/01aptproxy
|
|
||||||
|
|
||||||
e "Initiales Setup beendet."
|
e "Initiales Setup beendet."
|
||||||
|
|
Loading…
Reference in a new issue