Files
git/generate-script.sh
Carlo Marcelo Arenas Belón 0e3233b913 git-gui: honor TCLTK_PATH in git-gui--askpass
Since its introduction in 8c76212 (git-gui: Add a simple implementation
of SSH_ASKPASS., 2008-10-15), git-gui--askpass has been calling whatever
wish interpreter is in the path, unlike git-gui.

Correct that by turning it into a script that would be processed at build
time.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2025-07-31 18:42:54 +02:00

23 lines
305 B
Bash
Executable File

#!/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"