SpectreOS-old/update-packages
simono41 e753aee1c5 fix
2018-08-22 00:46:12 +02:00

32 lines
556 B
Bash
Executable file

#!/bin/bash
set -ex
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
sudo $0 $1 $2 $3 $4 $5 $6 $7 $8 $9
exit 0
fi
echo "Als root Angemeldet"
hostname="$(cat /etc/hostname)"
[[ -z "${version}" ]] && version="${hostname#*-}"
repo=SpectreOS
repo1=shell-scripte
cd /opt/${repo}
git reset --hard
git pull
function standartinstallation() {
pacman -Syu $(cat /opt/${repo}/packages_${version}.txt) --needed --noconfirm --ignore linux
}
standartinstallation
cd /opt/${repo1}
git reset --hard
git pull
echo "Fertig!!!"