From: Junio C Hamano Date: Thu, 12 Jun 2025 17:04:58 +0000 (-0700) Subject: build: sed portability fixes X-Git-Tag: v2.50.0~4^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=5acfacc2a125912c2172467fdaa0ef1f5ad6fb82;p=thirdparty%2Fgit.git build: sed portability fixes Recently generating the version-def.h file and the config-list.h file have been updated, which broke versions of "sed" that do not want to be fed a file that ends with an incomplete line, and/or that do not understand the more recent "-E" option to use extended regular expression. Fix them in response to a build-failure reported on Solaris boxes. cf. https://lore.kernel.org/git/09f954b8-d9c3-418f-ad4b-9cb9b063f4ae@comstyle.com/ Reported-by: Brad Smith Reviewed-by: Collin Funk Signed-off-by: Junio C Hamano --- diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index b981598298..b32cf928b7 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -82,7 +82,7 @@ read GIT_MAJOR_VERSION GIT_MINOR_VERSION GIT_MICRO_VERSION GIT_PATCH_LEVEL trail $(echo "$GIT_VERSION" 0 0 0 0 | tr '.a-zA-Z-' ' ') EOF -REPLACED=$(printf "%s" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \ +REPLACED=$(printf "%s\n" "$INPUT" | sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \ -e "s|@GIT_MAJOR_VERSION@|$GIT_MAJOR_VERSION|" \ -e "s|@GIT_MINOR_VERSION@|$GIT_MINOR_VERSION|" \ -e "s|@GIT_MICRO_VERSION@|$GIT_MICRO_VERSION|" \ diff --git a/generate-configlist.sh b/generate-configlist.sh index b06da53c89..f25cb9fc3e 100755 --- a/generate-configlist.sh +++ b/generate-configlist.sh @@ -13,17 +13,17 @@ print_config_list () { cat <