diff --git a/docker-build-runner.sh b/docker-build-runner.sh index f6f1160..20be7a8 100755 --- a/docker-build-runner.sh +++ b/docker-build-runner.sh @@ -157,9 +157,16 @@ seed_third_party_from_host() { local p for p in libvpx opus speex wireguard-android; do if [[ -d "${host_tree}/third-party/${p}" ]] && third_party_incomplete "$iso_tree" "$p"; then - log "[runner] seed third-party/${p} from host checkout" + log "[runner] seed third-party/${p} from host checkout (no .git metadata)" rm -rf "${iso_tree}/third-party/${p}" - cp -r "${host_tree}/third-party/${p}" "${iso_tree}/third-party/" + mkdir -p "${iso_tree}/third-party" + if command -v rsync >/dev/null 2>&1; then + rsync -a --delete --exclude='.git' --exclude='.git/' \ + "${host_tree}/third-party/${p}/" "${iso_tree}/third-party/${p}/" + else + cp -a "${host_tree}/third-party/${p}" "${iso_tree}/third-party/" + find "${iso_tree}/third-party/${p}" -name .git -exec rm -rf {} + 2>/dev/null || true + fi fi done } diff --git a/init-third-party-submodules.sh b/init-third-party-submodules.sh index 54647f6..db92cc2 100755 --- a/init-third-party-submodules.sh +++ b/init-third-party-submodules.sh @@ -91,6 +91,11 @@ for path in "${SUB_PATHS[@]}"; do echo "error: $path not in .gitmodules" >&2 exit 1 fi + if validate_path "$path"; then + short="$(git -C "$path" rev-parse --short HEAD 2>/dev/null || echo seeded)" + echo " $path @ $short (pre-seeded)" + continue + fi ensure_gitlink "$path" git submodule sync "$path" git submodule update --init --recursive "$path"