installer verbessert

This commit is contained in:
Désiré Werner Menrath 2023-11-03 11:13:42 +01:00
parent 4b83ef5ac3
commit 89187641d0

View File

@ -5,28 +5,30 @@
# Angemeldeten Benutzer ermitteln # Angemeldeten Benutzer ermitteln
a_user=$(whoami) a_user=$(whoami)
mkdir -p /home/"$a_user"/.icons ; cp icons/* /home/"$a_user"/.icons/ ; mkdir -p /home/"$a_user"/.config/wg_nmcli
wait;
echo Wire-G wird installiert.
# abfrage ob benötigte pakete installiert sind, wenn nicht dann installiere automatisch die benötigten Pakete. # abfrage ob benötigte pakete installiert sind, wenn nicht dann installiere automatisch die benötigten Pakete.
if grep -i 'mint\|debian\|ubuntu\|pop|' /etc/os-release > /dev/null 2>&1 if grep -i 'mint\|debian\|ubuntu\|pop|' /etc/os-release > /dev/null 2>&1
then then
if ! which yad > /dev/null ; then sudo apt install yad -y > /dev/null 2>&1 ; fi echo Wire-G wird installiert...
mkdir -p /home/"$a_user"/.icons ; cp icons/* /home/"$a_user"/.icons/ ; mkdir -p /home/"$a_user"/.config/wg_nmcli
if ! which yad > /dev/null ; then sudo apt install yad -y > /dev/null 2>&1 ; fi
echo yad wird installiert. Bitte warten... echo yad wird installiert. Bitte warten...
if ! which notify-send > /dev/null ; then sudo apt install libnotify-bin -y > /dev/null 2>&1 ; fi if ! which notify-send > /dev/null ; then sudo apt install libnotify-bin -y > /dev/null 2>&1 ; fi
echo libnotify wird installiert. Bitte warten... echo libnotify wird installiert. Bitte warten...
elif grep -i 'arch\|manjaro\|garuda\|endeavour|' /etc/os-release > /dev/null 2>&1 elif grep -i 'arch\|manjaro\|garuda\|endeavour|' /etc/os-release > /dev/null 2>&1
then then
if ! which yad > /dev/null ; then sudo pacman -S --noconfirm yad > /dev/null 2>&1 ; fi echo Wire-G wird installiert...
mkdir -p /home/"$a_user"/.icons ; cp icons/* /home/"$a_user"/.icons/ ; mkdir -p /home/"$a_user"/.config/wg_nmcli
if ! which yad > /dev/null ; then sudo pacman -S --noconfirm yad > /dev/null 2>&1 ; fi
echo yad wird installiert. Bitte warten... echo yad wird installiert. Bitte warten...
if ! which notify-send > /dev/null ; then sudo pacman -S --noconfirm libnotify > /dev/null 2>&1 ; fi if ! which notify-send > /dev/null ; then sudo pacman -S --noconfirm libnotify > /dev/null 2>&1 ; fi
echo libnotify wird installiert. Bitte warten... echo libnotify wird installiert. Bitte warten...
elif grep -i 'fedora' /etc/os-release > /dev/null 2>&1 elif grep -i 'fedora' /etc/os-release > /dev/null 2>&1
then then
echo Wire-G wird installiert...
mkdir -p /home/"$a_user"/.icons ; cp icons/* /home/"$a_user"/.icons/ ; mkdir -p /home/"$a_user"/.config/wg_nmcli
if ! which yad > /dev/null ; then sudo dnf install yad > /dev/null 2>&1 ; fi if ! which yad > /dev/null ; then sudo dnf install yad > /dev/null 2>&1 ; fi
echo yad wird installiert. Bitte warten... echo yad wird installiert. Bitte warten...
if ! which notify-send > /dev/null ; then sudo dnf install libnotify > /dev/null 2>&1 ; fi if ! which notify-send > /dev/null ; then sudo dnf install libnotify > /dev/null 2>&1 ; fi
@ -34,17 +36,28 @@ elif grep -i 'fedora' /etc/os-release > /dev/null 2>&1
elif grep -i 'suse' /etc/os-release > /dev/null 2>&1 elif grep -i 'suse' /etc/os-release > /dev/null 2>&1
then then
clear
echo Achtung OpenSuse wird nicht offiziell unterstützt!
echo
echo yad und libnotify müssen sie selbst installieren, wenn sie fortfahren!
echo da dies Pakete offiziell nicht verfügbar sind.
echo
read -p "Geben Sie i für die installation ein und die Eingabetaste, Abbruch mit jeder anderen Taste ..." response
if [ "$response" == "i" ]
then
echo Wire-G wird installiert...
mkdir -p /home/"$a_user"/.icons ; cp icons/* /home/"$a_user"/.icons/ ; mkdir -p /home/"$a_user"/.config/wg_nmcli
else
exit 1
fi
else
clear clear
echo Achtung OpenSuse wird nicht offiziell unterstützt!
echo Sie können yad nachinstallieren und Wire-G dann verwenden,
echo oder den uninstaller ausführen um Wire-G zu entfernen
else
echo Ihr system konnte nicht ermittelt werden. echo Ihr system konnte nicht ermittelt werden.
echo Bitte installieren sie yad und echo
echo eventuell libnotify noch auf iher Distro nach. read -n 1 -s -r -p "Zum Fenster schließen eine Taste drücken"
echo Wire-G ist dann auch für ihr System bereit. clear
exit 0
fi fi
wait; wait;