Files
git/tools/generate-script.sh
Patrick Steinhardt f6897d7e72 builds: move build scripts into "tools/"
We have a bunch of scripts used by our different build systems that are
all located in the top-level directory. Now that we have introduced the
new "tools/" directory though we have a better home for them.

Move the scripts into the "tools/" directory.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-10 11:23:48 -07:00

35 lines
661 B
Bash
Executable File

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