Fix: Geht in das Git-Verzeichnis

This commit is contained in:
DragonSlayer_14 2025-03-04 08:20:19 +01:00
parent a70f7dc167
commit ea1489341f

View File

@ -14,6 +14,7 @@ fi
# === Variablen ===
WHOAMI=$(whoami)
USER=${SUDO_USER:-$WHOAMI}
DIR=$(pwd)
# === Skript-Funktionen ===
cleanup() {
@ -50,7 +51,9 @@ trap cleanup SIGINT
wait_for_internet_connection
sudo -u $USER git pull |& while IFS= read -r line; do log "$line"; done
cd "$(dirname "$0")"
sudo -u "$USER" git pull |& while IFS= read -r line; do log "$line"; done
cd "$DIR"
update_packages
update_flatpak