forked from lxcafe/lxcafe
fixed problem with unexpected operator after pressing 'j'
This commit is contained in:
@@ -10,6 +10,18 @@
|
|||||||
|
|
||||||
bIsVlcInstalled=false
|
bIsVlcInstalled=false
|
||||||
|
|
||||||
|
# Prompt helper: ask a question and return 0 (yes) for j/J/ja/y/Y, non-zero otherwise
|
||||||
|
question_answered_with_yes() {
|
||||||
|
local prompt="$1"
|
||||||
|
local ans
|
||||||
|
# -r prevents backslash escapes being interpreted; -p prints the prompt
|
||||||
|
read -rp "$prompt [j/N]: " ans
|
||||||
|
case "$ans" in
|
||||||
|
j|J|ja|y|Y) return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
###################################
|
###################################
|
||||||
@@ -45,13 +57,10 @@ sSuffixDate=$(date '+%Y-%m-%d_%H:%M:%S')
|
|||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
read -p "#### 64 bit Mint XFCE ; Zusatzprogramme ####
|
if question_answered_with_yes "#### 64 bit Mint XFCE ; Zusatzprogramme ####\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo "#### 64 bit Mint XFCE ####"
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
sudo apt -y install xfce4-goodies clementine vlc htop hardinfo font-manager asunder gtkhash xfce4-panel-profiles
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
bIsVlcInstalled=true
|
||||||
echo "#### 64 bit Mint XFCE ####"
|
|
||||||
sudo apt -y install xfce4-goodies clementine vlc htop hardinfo font-manager asunder gtkhash xfce4-panel-profiles
|
|
||||||
bIsVlcInstalled=true
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
@@ -61,33 +70,27 @@ echo
|
|||||||
echo "#### nur auf Wunsch / bei Bedarf ####"
|
echo "#### nur auf Wunsch / bei Bedarf ####"
|
||||||
echo
|
echo
|
||||||
### Sensoren ###
|
### Sensoren ###
|
||||||
read -p " ### Sensoren ###
|
if question_answered_with_yes " ### Sensoren ###\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo "### Sensoren ###"
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
sudo apt install lm-sensors psensor
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
sudo sensors-detect
|
||||||
echo "### Sensoren ###"
|
sudo service kmod start
|
||||||
sudo apt install lm-sensors psensor
|
echo "## im Anschluss \"psensor\" konfigurieren im XFCE-Applet in der Taskleiste"
|
||||||
sudo sensors-detect
|
|
||||||
sudo service kmod start
|
|
||||||
echo "## im Anschluss "psensor" konfigurieren im XFCE-Applet in der Taskleiste"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
if $bIsVlcInstalled; then
|
if [ "$bIsVlcInstalled" = true ]; then
|
||||||
echo "### Kauf-DVDs abspielen ###"
|
echo "### Kauf-DVDs abspielen ###"
|
||||||
read -p " ### Film DVDs ###
|
if question_answered_with_yes " ### Film DVDs ###\n\tGeben Sie j oder n ein und die Eingabetaste,\n\tAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo "### Kauf-DVDs abspielen ###"
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
sudo apt install libdvd-pkg
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
sudo dpkg-reconfigure libdvd-pkg
|
||||||
echo "### Kauf-DVDs abspielen ###"
|
fi
|
||||||
sudo apt install libdvd-pkg
|
|
||||||
sudo dpkg-reconfigure libdvd-pkg
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "Player Fehlt
|
echo "Player Fehlt
|
||||||
## VLC muss installiert sein um Kauf-DVDs abspielen zu können"
|
## VLC muss installiert sein um Kauf-DVDs abspielen zu können"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -96,23 +99,17 @@ 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:"
|
||||||
|
|
||||||
read -p " ### M$ Schriften ###
|
if question_answered_with_yes " ### M$ Schriften ###\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo "### M$ Schriften ###"
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
sudo apt install ttf-mscorefonts-installer
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
|
||||||
echo "### M$ Schriften ###"
|
|
||||||
sudo apt install ttf-mscorefonts-installer
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo " ## freie Google-Schriften als Ersatz für aktuelle MS-Standardschriften installieren:"
|
echo " ## freie Google-Schriften als Ersatz für aktuelle MS-Standardschriften installieren:"
|
||||||
read -p " ### Google Schriften ###
|
if question_answered_with_yes " ### Google Schriften ###\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
echo "### Google Schriften ###"
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
|
||||||
echo
|
|
||||||
echo "### Google Schriften ###"
|
|
||||||
|
|
||||||
_gf="google-fonts"
|
_gf="google-fonts"
|
||||||
fGoogleSchriften=./$_gf".tar.gz"
|
fGoogleSchriften=./$_gf".tar.gz"
|
||||||
@@ -120,27 +117,23 @@ if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == '
|
|||||||
echo ""
|
echo ""
|
||||||
echo "$fGoogleSchriften nicht gefunden."
|
echo "$fGoogleSchriften nicht gefunden."
|
||||||
echo " soll das Archiv "google-fonts.tar.gz" von Github heruntergeladen werden? Es ist ca. 1,4GB gross! "
|
echo " soll das Archiv "google-fonts.tar.gz" von Github heruntergeladen werden? Es ist ca. 1,4GB gross! "
|
||||||
read -p " ### Download Google Schriften ###
|
if question_answered_with_yes " ### Download Google Schriften ###\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
_wgeturl="https://github.com/google/fonts/archive/main.tar.gz"
|
||||||
Abbruch mit jeder anderen Taste ... " runterLaden;
|
echo "Connecting to Github server to download fonts..."
|
||||||
if [ $runterLaden == 'j' -o $runterLaden == 'J' -o $runterLaden == 'ja' -o $runterLaden == 'y' -o $runterLaden == 'Y' ]; then
|
wget "$_wgeturl" -O "$_gf.tar.gz"
|
||||||
_wgeturl="https://github.com/google/fonts/archive/main.tar.gz"
|
fi
|
||||||
echo "Connecting to Github server to download fonts..."
|
|
||||||
wget $_wgeturl -O $_gf.tar.gz
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if [ -f "$fGoogleSchriften" ]; then
|
if [ -f "$fGoogleSchriften" ]; then
|
||||||
echo
|
echo
|
||||||
echo "$fGoogleSchriften nicht gefunden."
|
echo "Extracting the downloaded archive..."
|
||||||
echo "Extracting the downloaded archive..."
|
tar -zxvf "$_gf.tar.gz"
|
||||||
tar -zxvf $_gf.tar.gz
|
echo "Creating the /usr/share/fonts/truetype/$_gf folder"
|
||||||
echo "Creating the /usr/share/fonts/truetype/$_gf folder"
|
sudo mkdir -p /usr/share/fonts/truetype/$_gf
|
||||||
sudo mkdir -p /usr/share/fonts/truetype/$_gf
|
echo "Installing all .ttf fonts in /usr/share/fonts/truetype/$_gf"
|
||||||
echo "Installing all .ttf fonts in /usr/share/fonts/truetype/$_gf"
|
find "$PWD/fonts-main/" -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/truetype/google-fonts/ \; || echo "An error occured, please run this script again."
|
||||||
find $PWD/fonts-main/ -name "*.ttf" -exec sudo install -m644 {} /usr/share/fonts/truetype/google-fonts/ \; || echo "An error occured, please run this script again."
|
echo "Updating the font cache"
|
||||||
echo "Updating the font cache"
|
fc-cache -f
|
||||||
fc-cache -f
|
echo "Done. Now you can delete the tarball file $_gf.tar.gz if you wish."
|
||||||
echo "Done. Now you can delete the tarball file $_gf.tar.gz if you wish."
|
|
||||||
|
|
||||||
echo "Temporärer Fontordner wird gelöscht"
|
echo "Temporärer Fontordner wird gelöscht"
|
||||||
rm -r fonts-main
|
rm -r fonts-main
|
||||||
@@ -158,26 +151,19 @@ fi
|
|||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "#### Chromium Browser installieren:"
|
echo "#### Chromium Browser installieren:"
|
||||||
read -p " ### Chromium ###
|
if question_answered_with_yes " ### Chromium ###\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo "### Chromium ###"
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
sudo apt install chromium-browser
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
sudo apt install chromium
|
||||||
echo "### Chromium ###"
|
|
||||||
sudo apt install chromium-browser
|
|
||||||
sudo apt install chromium
|
|
||||||
fi88=
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "#### Vivaldi Browser installieren:"
|
echo "#### Vivaldi Browser installieren:"
|
||||||
read -p " ### Vivaldi ###
|
if question_answered_with_yes " ### Vivaldi ###\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo "### ###"
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
echo "## nötige Zusatzpakete installieren"
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl -y
|
||||||
echo "### ###"
|
|
||||||
echo "## nötige Zusatzpakete installieren"
|
|
||||||
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
|
||||||
@@ -197,16 +183,13 @@ 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!)#### "
|
||||||
read -p " ### Signal ###
|
if question_answered_with_yes " ### Signal ###\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo "### ###"
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
echo "## zusätzliches Repository nötig!
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
## NOTE: These instructions only work for 64-bit Debian-based
|
||||||
echo "### ###"
|
## Linux distributions such as Ubuntu, Mint etc.
|
||||||
echo "## zusätzliches Repository nötig!
|
## key importieren
|
||||||
## NOTE: These instructions only work for 64-bit Debian-based
|
"
|
||||||
## Linux distributions such as Ubuntu, Mint etc.
|
|
||||||
## key importieren
|
|
||||||
"
|
|
||||||
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
|
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
|
||||||
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
|
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
|
||||||
#
|
#
|
||||||
@@ -227,13 +210,10 @@ echo
|
|||||||
echo "Achtung! Es kann vorkommen, dass die Taskleiste nach diesem Schritt verschwunden ist."
|
echo "Achtung! Es kann vorkommen, dass die Taskleiste nach diesem Schritt verschwunden ist."
|
||||||
echo "Ein Abmelden und Wiederanmelden des Benutzers oder ein Reboot behebt das Problem."
|
echo "Ein Abmelden und Wiederanmelden des Benutzers oder ein Reboot behebt das Problem."
|
||||||
echo
|
echo
|
||||||
read -p " ### Panel ###
|
if question_answered_with_yes " ### Panel ###\nGeben Sie j oder n ein und die Eingabetaste,\nAbbruch mit jeder anderen Taste ..."; then
|
||||||
Geben Sie j oder n ein und die Eingabetaste,
|
echo "### ###"
|
||||||
Abbruch mit jeder anderen Taste ... " kommando;
|
echo "## Austausch der Panel-Konfigurationsdatei:"
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' -o $kommando == 'ja' -o $kommando == 'y' -o $kommando == 'Y' ]; then
|
xfce4-panel-profiles load current-config.tar.bz2
|
||||||
echo "### ###"
|
|
||||||
echo "## Austausch der Panel-Konfigurationsdatei:"
|
|
||||||
xfce4-panel-profiles load current-config.tar.bz2
|
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo "###############################"
|
echo "###############################"
|
||||||
@@ -251,6 +231,6 @@ echo
|
|||||||
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."
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
read -p " ### Um dieses Fenster zu schliessen, "Enter" drücken ### " kommando;
|
if question_answered_with_yes " ### Um dieses Fenster zu schliessen, \"Enter\" drücken ###"; then
|
||||||
if [ $kommando == 'j' -o $kommando == 'J' ]; then
|
exit 0
|
||||||
return
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user