Merge branch 'js/git-version-gen-update'

Build regression fix.

* js/git-version-gen-update:
  GIT-VERSION-GEN: allow it to be run in parallel
maint
Junio C Hamano 2025-01-10 09:19:33 -08:00
commit 3ae35648bf
1 changed files with 4 additions and 4 deletions

View File

@ -86,11 +86,11 @@ sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \
-e "s|@GIT_BUILT_FROM_COMMIT@|$GIT_BUILT_FROM_COMMIT|" \
-e "s|@GIT_USER_AGENT@|$GIT_USER_AGENT|" \
-e "s|@GIT_DATE@|$GIT_DATE|" \
"$INPUT" >"$OUTPUT"+
"$INPUT" >"$OUTPUT".$$+

if ! test -f "$OUTPUT" || ! cmp "$OUTPUT"+ "$OUTPUT" >/dev/null
if ! test -f "$OUTPUT" || ! cmp "$OUTPUT".$$+ "$OUTPUT" >/dev/null
then
mv "$OUTPUT"+ "$OUTPUT"
mv "$OUTPUT".$$+ "$OUTPUT"
else
rm "$OUTPUT"+
rm "$OUTPUT".$$+
fi