summaryrefslogtreecommitdiffstats
path: root/mkosi.images
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-10-02 10:50:59 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-10-02 11:29:34 +0200
commit9c7762c943bd5612f02a93b2ec986141fcb5226d (patch)
tree11d4fe072ba4a7267221222942de090d9da73547 /mkosi.images
parenttree-wide: Fix Wformat warnings (diff)
downloadsystemd-9c7762c943bd5612f02a93b2ec986141fcb5226d.tar.xz
systemd-9c7762c943bd5612f02a93b2ec986141fcb5226d.zip
mkosi: Don't sync if the packaging specs repo is dirty
Diffstat (limited to 'mkosi.images')
-rwxr-xr-xmkosi.images/build/mkosi.sync4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkosi.images/build/mkosi.sync b/mkosi.images/build/mkosi.sync
index 02d66e9939..eeaa73e98f 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"