summaryrefslogtreecommitdiff
path: root/generate-script.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2025-08-04 18:27:03 +0200
committerJohannes Sixt <j6t@kdbg.org>2025-08-04 18:27:03 +0200
commite3923e3e90da55e12545b5ef5aa34f21e97409d8 (patch)
tree9f44a7c27ed845e2162e5f26c04f5f278251e90d /generate-script.sh
parent14ff7c8956ef64831bcf8591c58b046deb458a29 (diff)
parente3efff4463c09f0070777000624f6b148873a0b5 (diff)
Merge branch 'cb/no-tcl86-on-macos'
* cb/no-tcl86-on-macos: git-gui: ensure own version of git-gui--askpass is used git-gui: honor TCLTK_PATH in git-gui--askpass git-gui: retire Git Gui.app git-gui: fix dependency of GITGUI_MAIN on generator git-gui: remove uname_O in Makefile
Diffstat (limited to 'generate-script.sh')
-rwxr-xr-xgenerate-script.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/generate-script.sh b/generate-script.sh
new file mode 100755
index 0000000000..0dd2da92e3
--- /dev/null
+++ b/generate-script.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if test $# -ne 3
+then
+ echo >&2 "USAGE: $0 <OUTPUT> <INPUT> <GIT-GUI-BUILD-OPTIONS>"
+ exit 1
+fi
+
+OUTPUT="$1"
+INPUT="$2"
+BUILD_OPTIONS="$3"
+
+. "$BUILD_OPTIONS"
+
+sed \
+ -e "1s|#!.*/sh|#!$SHELL_PATH|" \
+ -e "1,3s|^exec wish|exec '$TCLTK_PATH'|" \
+ "$INPUT" >"$OUTPUT"
+
+chmod a+x "$OUTPUT"