diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-03-27 11:00:01 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-27 11:00:01 -0700 |
| commit | d1f07dd50087bef18246feffb963d73b23e2cdd6 (patch) | |
| tree | 818b60e53f48bf6112eb0e834ef63a777f83de6b /tools/generate-script.sh | |
| parent | ebd8fa7e1291e4f82992db763e271ca261dd750b (diff) | |
| parent | 671df48df895fdf259b48a7f90b70b7c75fc4059 (diff) | |
| download | git-d1f07dd50087bef18246feffb963d73b23e2cdd6.tar.xz | |
Merge branch 'ps/build-tweaks'
Tweak the build infrastructure by moving tools around.
* ps/build-tweaks:
meson: precompile "git-compat-util.h"
meson: compile compatibility sources separately
git-compat-util.h: move warning infra to prepare for PCHs
builds: move build scripts into "tools/"
contrib: move "update-unicode.sh" script into "tools/"
contrib: move "coverage-diff.sh" script into "tools/"
contrib: move "coccinelle/" directory into "tools/"
Introduce new "tools/" directory
Diffstat (limited to 'tools/generate-script.sh')
| -rwxr-xr-x | tools/generate-script.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/generate-script.sh b/tools/generate-script.sh new file mode 100755 index 0000000000..a149e4f0ba --- /dev/null +++ b/tools/generate-script.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +set -e + +if test $# -ne 3 +then + echo >&2 "USAGE: $0 <INPUT> <OUTPUT> <GIT-BUILD-OPTIONS>" + exit 1 +fi + +INPUT="$1" +OUTPUT="$2" +BUILD_OPTIONS="$3" + +. "$BUILD_OPTIONS" + +sed -e "1s|#!.*/sh|#!$SHELL_PATH|" \ + -e "s|@SHELL_PATH@|$SHELL_PATH|" \ + -e "s|@DIFF@|$DIFF|" \ + -e "s|@LOCALEDIR@|$LOCALEDIR|g" \ + -e "s/@USE_GETTEXT_SCHEME@/$USE_GETTEXT_SCHEME/g" \ + -e "$BROKEN_PATH_FIX" \ + -e "s|@GITWEBDIR@|$GITWEBDIR|g" \ + -e "s|@PERL_PATH@|$PERL_PATH|g" \ + -e "s|@PAGER_ENV@|$PAGER_ENV|g" \ + "$INPUT" >"$OUTPUT" + +case "$(basename "$INPUT")" in +git-mergetool--lib.sh|git-sh-i18n.sh|git-sh-setup.sh) + ;; +*) + chmod a+x "$OUTPUT" + ;; +esac |
