2022-10-04 19:01:31 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
user=$(whoami)
|
|
|
|
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
|
|
echo "This script must be run as root" 1>&2
|
|
|
|
sudo "${0}" "$@"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
echo "Als root Angemeldet"
|
|
|
|
|
|
|
|
version="${1}"
|
|
|
|
|
|
|
|
git config --global credential.helper store
|
2022-12-31 00:38:27 +01:00
|
|
|
repo=SpectreOS
|
2022-10-04 19:01:31 +02:00
|
|
|
repo1=shell-scripte-code
|
|
|
|
arch=$(uname -m)
|
2022-10-04 19:34:40 +02:00
|
|
|
branch=master
|
2022-10-04 19:01:31 +02:00
|
|
|
|
|
|
|
# Aktualisiere die Repositiories
|
2023-02-17 15:46:13 +01:00
|
|
|
if [ -f "/opt/${repo}/repo.sh" ]; then
|
|
|
|
/opt/${repo}/repo.sh
|
|
|
|
else
|
|
|
|
/usr/bin/repo-script
|
|
|
|
fi
|
|
|
|
source /etc/environment
|
2022-10-04 19:01:31 +02:00
|
|
|
|
|
|
|
if [ -d "/opt/${repo}" ]; then
|
|
|
|
echo "${repo} existiert bereits!!!"
|
|
|
|
cd /opt/${repo}
|
2022-10-04 19:34:40 +02:00
|
|
|
git checkout ${branch}
|
2022-10-04 19:01:31 +02:00
|
|
|
if ! git remote set-url origin ${WEBADDRESS_OS}; then
|
|
|
|
git remote add origin ${WEBADDRESS_OS}
|
|
|
|
fi
|
|
|
|
git pull
|
|
|
|
else
|
2022-10-04 19:34:40 +02:00
|
|
|
git clone -b ${branch} ${WEBADDRESS_OS} /opt/${repo}
|
2022-10-04 19:01:31 +02:00
|
|
|
fi
|
|
|
|
if [ -d "/opt/${repo1}" ]; then
|
|
|
|
echo "${repo1} existiert bereits!!!"
|
|
|
|
cd /opt/${repo1}
|
|
|
|
if ! git remote set-url origin ${WEBADDRESS_SCRIPTE}; then
|
|
|
|
git remote add origin ${WEBADDRESS_SCRIPTE}
|
|
|
|
fi
|
|
|
|
git pull
|
|
|
|
else
|
|
|
|
git clone ${WEBADDRESS_SCRIPTE} /opt/${repo1}
|
|
|
|
fi
|
|
|
|
cd /
|
|
|
|
|
2023-01-30 14:23:01 +01:00
|
|
|
cp /opt/${repo}/arch-graphical-install-auto.sh /usr/bin/arch-graphical-install-auto.sh
|
|
|
|
/usr/bin/arch-graphical-install-auto.sh
|
2022-10-04 19:01:31 +02:00
|
|
|
|
|
|
|
echo "Fertig!!!"
|