aboutsummaryrefslogtreecommitdiff
path: root/tools/generate-python.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-27 11:00:01 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-27 11:00:01 -0700
commitd1f07dd50087bef18246feffb963d73b23e2cdd6 (patch)
tree818b60e53f48bf6112eb0e834ef63a777f83de6b /tools/generate-python.sh
parentebd8fa7e1291e4f82992db763e271ca261dd750b (diff)
parent671df48df895fdf259b48a7f90b70b7c75fc4059 (diff)
downloadgit-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-python.sh')
-rwxr-xr-xtools/generate-python.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/generate-python.sh b/tools/generate-python.sh
new file mode 100755
index 0000000000..31ac115689
--- /dev/null
+++ b/tools/generate-python.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+if test $# -ne 3
+then
+ echo >&2 "USAGE: $0 <GIT_BUILD_OPTIONS> <INPUT> <OUTPUT>"
+ exit 1
+fi
+
+GIT_BUILD_OPTIONS="$1"
+INPUT="$2"
+OUTPUT="$3"
+
+. "$GIT_BUILD_OPTIONS"
+
+sed -e "1s|#!.*python|#!$PYTHON_PATH|" \
+ "$INPUT" >"$OUTPUT+"
+chmod a+x "$OUTPUT+"
+mv "$OUTPUT+" "$OUTPUT"