From 9c7762c943bd5612f02a93b2ec986141fcb5226d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 2 Oct 2024 10:50:59 +0200 Subject: [PATCH] mkosi: Don't sync if the packaging specs repo is dirty --- mkosi.images/build/mkosi.sync | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkosi.images/build/mkosi.sync b/mkosi.images/build/mkosi.sync index 02d66e99391..eeaa73e98f0 100755 --- a/mkosi.images/build/mkosi.sync +++ b/mkosi.images/build/mkosi.sync @@ -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"