mkosi: Don't sync if the packaging specs repo is dirty

This commit is contained in:
Daan De Meyer 2024-10-02 10:50:59 +02:00
parent c73d14c43e
commit 9c7762c943

View File

@ -12,6 +12,10 @@ if [[ -d "pkg/$PKG_SUBDIR/.git" ]]; then
exit 0
fi
if [[ -n "$(git -C "pkg/$PKG_SUBDIR" status --porcelain)" ]]; then
exit 0
fi
if ! git -C "pkg/$PKG_SUBDIR" show-ref --quiet "origin/$GIT_BRANCH"; then
git -C "pkg/$PKG_SUBDIR" remote set-url origin "$GIT_URL"
git -C "pkg/$PKG_SUBDIR" fetch origin "$GIT_BRANCH"