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
|
|
|
|
/opt/${repo}/repo.sh
|
|
|
|
|
|
|
|
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 /
|
|
|
|
|
|
|
|
/opt/${repo}/arch-graphical-install-auto.sh
|
|
|
|
|
|
|
|
echo "Fertig!!!"
|