sync_client_software: run git clean from repo root

git clean -fd scopes to the current directory and below, so running it
from the system_setup/ subdirectory missed untracked files in sibling
dirs like config/. Use -C "${SYSCONFIGPATH}" to always clean from the
repo root regardless of invocation directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel unbrot Pätzold
2026-05-04 19:22:56 +02:00
parent 1ac952c094
commit a3c95ab146
+1 -1
View File
@@ -52,7 +52,7 @@ if [[ ! -z "${REPO_URL}" ]]; then
# Doing upgrade, discarding all local changes frist (is more save than forced pull) # Doing upgrade, discarding all local changes frist (is more save than forced pull)
echo "Checks have passed, we are now upgrading via git." echo "Checks have passed, we are now upgrading via git."
#Fetch latest commit only (depth=1), reset working tree, purge old history and untracked files #Fetch latest commit only (depth=1), reset working tree, purge old history and untracked files
git fetch --depth=1 origin ${REPO_BRANCH} && git reset --hard FETCH_HEAD && git clean -fd && git gc --prune=now --quiet git fetch --depth=1 origin ${REPO_BRANCH} && git reset --hard FETCH_HEAD && git -C "${SYSCONFIGPATH}" clean -fd && git gc --prune=now --quiet
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "Error: Failure while updating, will continue as is." echo "Error: Failure while updating, will continue as is."
fi fi