2018-02-26 02:41:29 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# sudo update standart username userpass
|
|
|
|
#
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
echo "Version : Fr 22. Dez 00:00:41 CET 2017"
|
|
|
|
|
2018-02-26 02:46:23 +01:00
|
|
|
WEBADDRESS="https://github.com/simono41/SpectreOS.git"
|
2018-02-26 02:41:29 +01:00
|
|
|
repo="SpectreOS"
|
|
|
|
user="user1"
|
|
|
|
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
|
|
echo "This script must be run as root" 1>&2
|
|
|
|
sudo $0
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
echo "Als root Angemeldet"
|
|
|
|
|
|
|
|
function gitclone() {
|
2018-03-14 19:40:21 +01:00
|
|
|
if [ -d "/opt/${repo}" ]; then
|
2018-02-26 02:41:29 +01:00
|
|
|
echo "${repo} existiert bereits!!!"
|
2018-03-14 19:40:21 +01:00
|
|
|
cd /opt/${repo}
|
|
|
|
git pull
|
|
|
|
else
|
|
|
|
git clone ${WEBADDRESS} /opt/${repo}
|
2018-02-26 02:41:29 +01:00
|
|
|
fi
|
|
|
|
cd /
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "${1}" != "n" ]
|
|
|
|
then
|
|
|
|
read -p "Soll im Internet geguckt werden ob es neue Updates gibt?: [Y/n] " update
|
|
|
|
if [ "${update}" == "debug" ]
|
|
|
|
then
|
|
|
|
echo "Überspringe das herunterladen einen neuen Scriptes!!!"
|
|
|
|
else
|
|
|
|
if [ "${update}" != "n" ]
|
|
|
|
then
|
|
|
|
if [ -f /usr/bin/git ]; then
|
|
|
|
gitclone
|
|
|
|
else
|
|
|
|
echo "Git is not installet"
|
|
|
|
pacman -S git --needed --noconfirm
|
|
|
|
fi
|
|
|
|
/root/${repo}/arch-graphical-install-auto "$1" "$2" "$3"
|
|
|
|
read -p "Aktualisierung erfolgreich Abgeschlossen. Wollen sie den PC NEUSTARTEN?: [Y/n] " sicherheitsabfrage
|
|
|
|
if [ "$sicherheitsabfrage" != "n" ]
|
|
|
|
then
|
|
|
|
echo "starte neu"
|
|
|
|
reboot
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|