From ea1489341f7feb9533b64a03ddde64e3b0e4f41d Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Tue, 4 Mar 2025 08:20:19 +0100 Subject: [PATCH] Fix: Geht in das Git-Verzeichnis --- Maintenance/Update.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Maintenance/Update.sh b/Maintenance/Update.sh index 3c5200c..7912c55 100755 --- a/Maintenance/Update.sh +++ b/Maintenance/Update.sh @@ -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