24.12.2024 22:41, Michael Tokarev wrote:
19.12.2024 13:27, Paolo Bonzini wrote:

-tar --exclude=.git -cJf ${destination}.tar.xz ${destination}
+
+exclude=(--exclude=.git)
+# include the tarballs in subprojects/packagecache but not their expansion
+for sp in $SUBPROJECTS; do
+    if grep -xqF "[wrap-file]" subprojects/$sp.wrap; then
+      exclude+=(--exclude=subprojects/"$(subproject_dir $sp)")
+    fi
+done
+tar "${exclude[@]}" -cJf ${destination}.tar.xz ${destination}
  rm -rf ${destination}

Actually there might be a better way here.  How about

 tar --exclude=.git $(sed -n 's|^/|subprojects/|' subprojects/.gitignore)

?

Thanks,

/mjt

Reply via email to