mirror of
https://codeberg.org/knightsub9/lxcafe.git
synced 2026-07-19 19:30:16 +02:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b90195586c | ||
|
|
4fcfcbe06b |
@@ -2,18 +2,6 @@
|
|||||||
|
|
||||||
SCRIPT_VERSION="v11"
|
SCRIPT_VERSION="v11"
|
||||||
|
|
||||||
question_answered_with_yes() {
|
|
||||||
local prompt="$1"
|
|
||||||
local ans
|
|
||||||
printf '%b\n Geben Sie j oder n ein und die Eingabetaste,\n Abbruch mit jeder anderen Taste ... [j/N]: ' "$prompt"
|
|
||||||
read -r ans
|
|
||||||
case "$ans" in
|
|
||||||
j|J|ja|y|Y) return 0 ;;
|
|
||||||
n|N|"") return 1 ;;
|
|
||||||
*) echo "Abbruch."; exit 1 ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
#####################################
|
#####################################
|
||||||
#### Nachinstallationsarbeiten
|
#### Nachinstallationsarbeiten
|
||||||
@@ -48,17 +36,17 @@ sudo apt -y install clementine vlc htop hardinfo font-manager asunder gtkhash
|
|||||||
sSuffixDate=$(date '+%Y-%m-%d_%H:%M:%S')
|
sSuffixDate=$(date '+%Y-%m-%d_%H:%M:%S')
|
||||||
|
|
||||||
detect_desktop() {
|
detect_desktop() {
|
||||||
if [ -n "$XDG_CURRENT_DESKTOP" ]; then
|
if [ -n "$XDG_CURRENT_DESKTOP" ]; then
|
||||||
case "$XDG_CURRENT_DESKTOP" in
|
case "$XDG_CURRENT_DESKTOP" in
|
||||||
XFCE|Xfce|xfce) echo "xfce" ;;
|
XFCE | Xfce | xfce) echo "xfce" ;;
|
||||||
X-Cinnamon|Cinnamon|cinnamon) echo "cinnamon" ;;
|
X-Cinnamon | Cinnamon | cinnamon) echo "cinnamon" ;;
|
||||||
esac
|
esac
|
||||||
elif [ -n "$DESKTOP_SESSION" ]; then
|
elif [ -n "$DESKTOP_SESSION" ]; then
|
||||||
case "$DESKTOP_SESSION" in
|
case "$DESKTOP_SESSION" in
|
||||||
*xfce*|*XFCE*) echo "xfce" ;;
|
*xfce* | *XFCE*) echo "xfce" ;;
|
||||||
*cinnamon*|*Cinnamon*) echo "cinnamon" ;;
|
*cinnamon* | *Cinnamon*) echo "cinnamon" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@@ -69,48 +57,54 @@ DETECTED_DESKTOP=$(detect_desktop)
|
|||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
|
||||||
if [ -z "$DETECTED_DESKTOP" ]; then
|
if [ -z "$DETECTED_DESKTOP" ]; then
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "Desktop-Umgebung konnte nicht erkannt werden."
|
||||||
|
echo "Bitte manuell auswählen:"
|
||||||
|
echo "1) XFCE"
|
||||||
|
echo "2) Cinnamon"
|
||||||
|
echo -n "Auswahl: "
|
||||||
|
read -r desktop_choice
|
||||||
|
case "$desktop_choice" in
|
||||||
|
1) DESKTOP="xfce" ;;
|
||||||
|
2) DESKTOP="cinnamon" ;;
|
||||||
|
*)
|
||||||
|
echo "Ungültige Auswahl. Skript wird beendet."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "Erkannte Desktop-Umgebung: $DETECTED_DESKTOP"
|
||||||
|
if question_answered_with_yes "Verwende erkannte Desktop-Umgebung?"; then
|
||||||
|
DESKTOP="$DETECTED_DESKTOP"
|
||||||
|
else
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "Desktop-Umgebung konnte nicht erkannt werden."
|
|
||||||
echo "Bitte manuell auswählen:"
|
echo "Bitte manuell auswählen:"
|
||||||
echo "1) XFCE"
|
echo "1) XFCE"
|
||||||
echo "2) Cinnamon"
|
echo "2) Cinnamon"
|
||||||
echo -n "Auswahl: "
|
echo -n "Auswahl: "
|
||||||
read -r desktop_choice
|
read -r desktop_choice
|
||||||
case "$desktop_choice" in
|
case "$desktop_choice" in
|
||||||
1) DESKTOP="xfce" ;;
|
1) DESKTOP="xfce" ;;
|
||||||
2) DESKTOP="cinnamon" ;;
|
2) DESKTOP="cinnamon" ;;
|
||||||
*) echo "Ungültige Auswahl. Skript wird beendet."; exit 1 ;;
|
*)
|
||||||
|
echo "Ungültige Auswahl. Skript wird beendet."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
fi
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "Erkannte Desktop-Umgebung: $DETECTED_DESKTOP"
|
|
||||||
if question_answered_with_yes "Verwende erkannte Desktop-Umgebung?"; then
|
|
||||||
DESKTOP="$DETECTED_DESKTOP"
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "Bitte manuell auswählen:"
|
|
||||||
echo "1) XFCE"
|
|
||||||
echo "2) Cinnamon"
|
|
||||||
echo -n "Auswahl: "
|
|
||||||
read -r desktop_choice
|
|
||||||
case "$desktop_choice" in
|
|
||||||
1) DESKTOP="xfce" ;;
|
|
||||||
2) DESKTOP="cinnamon" ;;
|
|
||||||
*) echo "Ungültige Auswahl. Skript wird beendet."; exit 1 ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$DESKTOP" in
|
case "$DESKTOP" in
|
||||||
xfce)
|
xfce)
|
||||||
source "$SCRIPT_DIR/xfce/xfce.sh"
|
source "$SCRIPT_DIR/xfce/xfce.sh"
|
||||||
;;
|
;;
|
||||||
cinnamon)
|
cinnamon)
|
||||||
source "$SCRIPT_DIR/cinnamon/cinnamon.sh"
|
source "$SCRIPT_DIR/cinnamon/cinnamon.sh"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
@@ -121,151 +115,146 @@ echo "#### nur auf Wunsch / bei Bedarf ####"
|
|||||||
echo
|
echo
|
||||||
### Sensoren ###
|
### Sensoren ###
|
||||||
if question_answered_with_yes " ### Installiere Sensoren? ###"; then
|
if question_answered_with_yes " ### Installiere Sensoren? ###"; then
|
||||||
echo "### Sensoren ###"
|
echo "### Sensoren ###"
|
||||||
sudo apt install lm-sensors psensor
|
sudo apt install lm-sensors psensor
|
||||||
sudo sensors-detect
|
sudo sensors-detect
|
||||||
sudo service kmod start
|
sudo service kmod start
|
||||||
if [ "$DESKTOP" = "xfce" ]; then
|
if [ "$DESKTOP" = "xfce" ]; then
|
||||||
echo "## im Anschluss \"psensor\" konfigurieren im XFCE-Applet in der Taskleiste"
|
echo "## im Anschluss \"psensor\" konfigurieren im XFCE-Applet in der Taskleiste"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "### Kauf-DVDs abspielen ###"
|
echo "### Kauf-DVDs abspielen ###"
|
||||||
if question_answered_with_yes " ### Installiere Paket um Film DVDs abspielen zu können? ###"; then
|
if question_answered_with_yes " ### Installiere Paket um Film DVDs abspielen zu können? ###"; then
|
||||||
echo "### Kauf-DVDs abspielen ###"
|
echo "### Kauf-DVDs abspielen ###"
|
||||||
sudo apt install libdvd-pkg
|
sudo apt install libdvd-pkg
|
||||||
sudo dpkg-reconfigure libdvd-pkg
|
sudo dpkg-reconfigure libdvd-pkg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "### Schriften, falls Microsoft-Office-Dokumente weiterverwendet werden sollen oder Dokumentenaustausch mit Microsoft-Nutzern gewünscht ist ###
|
echo "### Schriften, falls Microsoft-Office-Dokumente weiterverwendet werden sollen oder Dokumentenaustausch mit Microsoft-Nutzern gewünscht ist ###
|
||||||
## frei verfügbare, alte Microsoft-Standardschriften installieren:"
|
## frei verfügbare, alte Microsoft-Standardschriften installieren:"
|
||||||
|
|
||||||
if question_answered_with_yes " ### Installiere M$ Schriften? ###"; then
|
if question_answered_with_yes " ### Installiere M$ Schriften? ###"; then
|
||||||
echo "### M$ Schriften ###"
|
echo "### M$ Schriften ###"
|
||||||
sudo apt install ttf-mscorefonts-installer
|
sudo apt install ttf-mscorefonts-installer
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo " ## Microsoft Aptos Schriftarten installieren:"
|
echo " ## Microsoft Aptos Schriftarten installieren:"
|
||||||
if question_answered_with_yes " ### Installiere Aptos Schriften? ###"; then
|
if question_answered_with_yes " ### Installiere Aptos Schriften? ###"; then
|
||||||
echo
|
echo
|
||||||
echo "### Aptos Schriften ###"
|
echo "### Aptos Schriften ###"
|
||||||
|
|
||||||
_aptos_zip="/tmp/Microsoft Aptos Fonts.zip"
|
_aptos_zip="/tmp/Microsoft Aptos Fonts.zip"
|
||||||
_aptos_url="https://download.microsoft.com/download/8/6/0/860a94fa-7feb-44ef-ac79-c072d9113d69/Microsoft%20Aptos%20Fonts.zip"
|
_aptos_url="https://download.microsoft.com/download/8/6/0/860a94fa-7feb-44ef-ac79-c072d9113d69/Microsoft%20Aptos%20Fonts.zip"
|
||||||
|
|
||||||
echo "Lade Aptos Schriften herunter..."
|
echo "Lade Aptos Schriften herunter..."
|
||||||
wget "$_aptos_url" -O "$_aptos_zip"
|
wget "$_aptos_url" -O "$_aptos_zip"
|
||||||
|
|
||||||
echo "Entpacke das Archiv..."
|
echo "Entpacke das Archiv..."
|
||||||
unzip -o "$_aptos_zip" -d /tmp/aptos_fonts
|
unzip -o "$_aptos_zip" -d /tmp/aptos_fonts
|
||||||
echo "Erstelle /usr/share/fonts/truetype/aptos/"
|
echo "Erstelle /usr/share/fonts/truetype/aptos/"
|
||||||
sudo mkdir -p /usr/share/fonts/truetype/aptos
|
sudo mkdir -p /usr/share/fonts/truetype/aptos
|
||||||
echo "Installiere alle .ttf Schriften..."
|
echo "Installiere alle .ttf Schriften..."
|
||||||
find /tmp/aptos_fonts -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/truetype/aptos/ \; 2>/dev/null || true
|
find /tmp/aptos_fonts -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/truetype/aptos/ \; 2>/dev/null || true
|
||||||
echo "Aktualisiere den Font-Cache"
|
echo "Aktualisiere den Font-Cache"
|
||||||
fc-cache -f
|
fc-cache -f
|
||||||
echo "Fertig! Aptos Schriftarten sind installiert."
|
echo "Fertig! Aptos Schriftarten sind installiert."
|
||||||
|
|
||||||
echo "Entferne temporäre Dateien..."
|
echo "Entferne temporäre Dateien..."
|
||||||
rm -rf "$_aptos_zip" /tmp/aptos_fonts
|
rm -rf "$_aptos_zip" /tmp/aptos_fonts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo " ## freie Google-Schriften"
|
echo " ## freie Google-Schriften"
|
||||||
if question_answered_with_yes " ### Installiere Google Schriften? ###"; then
|
if question_answered_with_yes " ### Installiere Google Schriften? ###"; then
|
||||||
echo
|
echo
|
||||||
echo "### Google Schriften ###"
|
echo "### Google Schriften ###"
|
||||||
|
|
||||||
_google_fonts_dir="/usr/share/fonts/truetype/google-fonts"
|
_google_fonts_dir="/usr/share/fonts/truetype/google-fonts"
|
||||||
_google_fonts_url_base="https://gwfh.mranftl.com/api/fonts"
|
_google_fonts_url_base="https://gwfh.mranftl.com/api/fonts"
|
||||||
|
|
||||||
_google_fonts="arimo carlito caladea inconsolata cousine libre-franklin neuton cabin oswald crimson-text lustria tinos league-spartan pt-sans"
|
_google_fonts="arimo carlito caladea inconsolata cousine libre-franklin neuton cabin oswald crimson-text lustria tinos league-spartan pt-sans"
|
||||||
|
|
||||||
sudo mkdir -p "$_google_fonts_dir"
|
sudo mkdir -p "$_google_fonts_dir"
|
||||||
|
|
||||||
for _font in $_google_fonts; do
|
for _font in $_google_fonts; do
|
||||||
echo "Lade $_font herunter..."
|
echo "Lade $_font herunter..."
|
||||||
curl -s -o /tmp/"$_font".zip "${_google_fonts_url_base}/$_font?download=zip&subsets=latin,latin-ext&variants=regular,700"
|
curl -s -o /tmp/"$_font".zip "${_google_fonts_url_base}/$_font?download=zip&subsets=latin,latin-ext&variants=regular,700"
|
||||||
if [ -s /tmp/"$_font".zip ] && head -c 2 /tmp/"$_font".zip | grep -q "PK"; then
|
if [ -s /tmp/"$_font".zip ] && head -c 2 /tmp/"$_font".zip | grep -q "PK"; then
|
||||||
unzip -o /tmp/"$_font".zip -d /tmp/"$_font"_fonts
|
unzip -o /tmp/"$_font".zip -d /tmp/"$_font"_fonts
|
||||||
sudo cp /tmp/"$_font"_fonts/fonts/"$_font"/* "$_google_fonts_dir/" 2>/dev/null || \
|
sudo cp /tmp/"$_font"_fonts/fonts/"$_font"/* "$_google_fonts_dir/" 2>/dev/null ||
|
||||||
sudo cp /tmp/"$_font"_fonts/* "$_google_fonts_dir/" 2>/dev/null || true
|
sudo cp /tmp/"$_font"_fonts/* "$_google_fonts_dir/" 2>/dev/null || true
|
||||||
rm -rf /tmp/"$_font".zip /tmp/"$_font"_fonts
|
rm -rf /tmp/"$_font".zip /tmp/"$_font"_fonts
|
||||||
else
|
else
|
||||||
echo "Fehler: Download von $_font fehlgeschlagen, überspringe..."
|
echo "Fehler: Download von $_font fehlgeschlagen, überspringe..."
|
||||||
rm -f /tmp/"$_font".zip
|
rm -f /tmp/"$_font".zip
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Aktualisiere den Font-Cache"
|
echo "Aktualisiere den Font-Cache"
|
||||||
fc-cache -f
|
fc-cache -f
|
||||||
echo "Fertig! Google Schriftarten sind installiert."
|
echo "Fertig! Google Schriftarten sind installiert."
|
||||||
echo "Die Anpassung der Standardschriften und/oder das Erstellen der Ersetzungstabelle in Libre Office muss manuell erfolgen, falls gewünscht."
|
echo "Die Anpassung der Standardschriften und/oder das Erstellen der Ersetzungstabelle in Libre Office muss manuell erfolgen, falls gewünscht."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "#### Chromium Browser installieren:"
|
echo "#### Chromium Browser installieren:"
|
||||||
if question_answered_with_yes " ### Installiere Chromium? ###"; then
|
if question_answered_with_yes " ### Installiere Chromium? ###"; then
|
||||||
echo "### Chromium ###"
|
echo "### Chromium ###"
|
||||||
sudo apt install chromium-browser
|
sudo apt install chromium-browser
|
||||||
sudo apt install chromium
|
sudo apt install chromium
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "#### Vivaldi Browser installieren:"
|
echo "#### Vivaldi Browser installieren:"
|
||||||
if question_answered_with_yes " ### Installiere Vivaldi? ###"; then
|
if question_answered_with_yes " ### Installiere Vivaldi? ###"; then
|
||||||
echo "### ###"
|
echo "### ###"
|
||||||
echo "## nötige Zusatzpakete installieren"
|
echo "## nötige Zusatzpakete installieren"
|
||||||
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl -y
|
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl -y
|
||||||
#
|
#
|
||||||
echo "## ## key importieren"
|
echo "## ## key importieren"
|
||||||
curl -fsSL https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor | sudo tee /usr/share/keyrings/vivaldi.gpg > /dev/null
|
curl -fsSL https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor | sudo tee /usr/share/keyrings/vivaldi.gpg >/dev/null
|
||||||
#
|
#
|
||||||
echo "## ## Repository hinzufügen"
|
echo "## ## Repository hinzufügen"
|
||||||
echo deb [arch=amd64,armhf signed-by=/usr/share/keyrings/vivaldi.gpg] https://repo.vivaldi.com/stable/deb/ stable main | sudo tee /etc/apt/sources.list.d/vivaldi.list
|
echo deb [arch=amd64,armhf signed-by=/usr/share/keyrings/vivaldi.gpg] https://repo.vivaldi.com/stable/deb/ stable main | sudo tee /etc/apt/sources.list.d/vivaldi.list
|
||||||
#
|
#
|
||||||
sudo apt update && sudo apt install vivaldi-stable
|
sudo apt update && sudo apt install vivaldi-stable
|
||||||
#
|
#
|
||||||
echo "## ## Gnome-Schlüsselbund-Fehlermeldung bei jedem Start von Chrome/Chromium beheben: Starter bzw. .desktop-Datei mit folgendem Parameter ergänzen: "
|
echo "## ## Gnome-Schlüsselbund-Fehlermeldung bei jedem Start von Chrome/Chromium beheben: Starter bzw. .desktop-Datei mit folgendem Parameter ergänzen: "
|
||||||
echo "## ## --password-store=basic"
|
echo "## ## --password-store=basic"
|
||||||
#
|
#
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "####Signal für Desktop (die Nutzung setzt eine Signal-Installation auf einem Android- Oder Apple-Gerät voraus!)#### "
|
echo "####Signal für Desktop (die Nutzung setzt eine Signal-Installation auf einem Android- Oder Apple-Gerät voraus!)#### "
|
||||||
if question_answered_with_yes " ### Installiere Signal? ###"; then
|
if question_answered_with_yes " ### Installiere Signal? ###"; then
|
||||||
echo "### ###"
|
echo "### ###"
|
||||||
echo "## zusätzliches Repository nötig!
|
echo "## zusätzliches Repository nötig!
|
||||||
## NOTE: These instructions only work for 64-bit Debian-based
|
## NOTE: These instructions only work for 64-bit Debian-based
|
||||||
## Linux distributions such as Ubuntu, Mint etc.
|
## Linux distributions such as Ubuntu, Mint etc.
|
||||||
## key importieren
|
## key importieren
|
||||||
"
|
"
|
||||||
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > /tmp/signal-desktop-keyring.gpg
|
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor >/tmp/signal-desktop-keyring.gpg
|
||||||
cat /tmp/signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
|
cat /tmp/signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg >/dev/null
|
||||||
#
|
#
|
||||||
echo "## Repository hinzufügen:"
|
echo "## Repository hinzufügen:"
|
||||||
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | sudo tee /etc/apt/sources.list.d/signal-xenial.list
|
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | sudo tee /etc/apt/sources.list.d/signal-xenial.list
|
||||||
sudo apt update && sudo apt install signal-desktop
|
sudo apt update && sudo apt install signal-desktop
|
||||||
#
|
#
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# execute bundles
|
||||||
|
# example: $SCRIPT_DIR/bundles/template.sh
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "###############################"
|
echo "###############################"
|
||||||
@@ -277,8 +266,8 @@ echo
|
|||||||
echo "Verbleibende manuelle Schritte:"
|
echo "Verbleibende manuelle Schritte:"
|
||||||
|
|
||||||
if [ "$DESKTOP" = "xfce" ]; then
|
if [ "$DESKTOP" = "xfce" ]; then
|
||||||
echo "### Taskleiste ###: XFCE-Applets für 2x Netzwerkmonitor (LAN + WLAN) konfigurieren"
|
echo "### Taskleiste ###: XFCE-Applets für 2x Netzwerkmonitor (LAN + WLAN) konfigurieren"
|
||||||
echo "Wenn ### Sensoren ### installiert wurden: psensor konfigurieren im XFCE-Applet in der Taskleiste, falls gewünscht."
|
echo "Wenn ### Sensoren ### installiert wurden: psensor konfigurieren im XFCE-Applet in der Taskleiste, falls gewünscht."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Wenn ### Google-Schriften ### installiert wurden: Anpassung der Standardschriften und/oder das Erstellen der Ersetzungstabelle in Libre Office, falls gewünscht."
|
echo "Wenn ### Google-Schriften ### installiert wurden: Anpassung der Standardschriften und/oder das Erstellen der Ersetzungstabelle in Libre Office, falls gewünscht."
|
||||||
|
|||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# <short description here>
|
||||||
|
# A shellscript meant to be used as subscript of `/post_installation_script/Nachinstallationsarbeiten_LC_Esslingen.sh`.
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "$0")"/.. && pwd)"
|
||||||
|
source "$SCRIPT_DIR/common.sh"
|
||||||
|
|
||||||
|
# please seperate stuff that doesn't belong together and maybe put short descriptions before those blocks (as comments) like in the following example:
|
||||||
|
# # Steam and Steam-related packages
|
||||||
|
# echo '### Steam ###'
|
||||||
|
# if question_answered_with_yes " ### Installiere Steam? ###"; then
|
||||||
|
# echo "### Steam ###"
|
||||||
|
# sudo apt install steam-installer
|
||||||
|
# # sudo flatpak install com.valvesoftware.Steam
|
||||||
|
# if question_answered_with_yes " ### Installiere Steam-Geräte-Unterstützungspaket (z. B. für Steam-Controller)? ###"; then
|
||||||
|
# echo "### Steam-Devices ###"
|
||||||
|
# sudo apt install steam-devices
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
|
# echo '### Ende Steam ###'
|
||||||
Executable
+16
@@ -0,0 +1,16 @@
|
|||||||
|
# functions and variables for use in multiple files ("common" functions and variables)
|
||||||
|
|
||||||
|
question_answered_with_yes() {
|
||||||
|
local prompt="$1"
|
||||||
|
local ans
|
||||||
|
printf '%b\n Geben Sie j oder n ein und die Eingabetaste,\n Abbruch mit jeder anderen Taste ... [j/N]: ' "$prompt"
|
||||||
|
read -r ans
|
||||||
|
case "$ans" in
|
||||||
|
j | J | ja | y | Y) return 0 ;;
|
||||||
|
n | N | "") return 1 ;;
|
||||||
|
*)
|
||||||
|
echo "Abbruch."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user