summaryrefslogtreecommitdiff
path: root/generate-script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate-script.sh')
-rwxr-xr-xgenerate-script.sh28
1 files changed, 20 insertions, 8 deletions
diff --git a/generate-script.sh b/generate-script.sh
index 0dd2da92e3..a149e4f0ba 100755
--- a/generate-script.sh
+++ b/generate-script.sh
@@ -4,19 +4,31 @@ set -e
if test $# -ne 3
then
- echo >&2 "USAGE: $0 <OUTPUT> <INPUT> <GIT-GUI-BUILD-OPTIONS>"
+ echo >&2 "USAGE: $0 <INPUT> <OUTPUT> <GIT-BUILD-OPTIONS>"
exit 1
fi
-OUTPUT="$1"
-INPUT="$2"
+INPUT="$1"
+OUTPUT="$2"
BUILD_OPTIONS="$3"
. "$BUILD_OPTIONS"
-sed \
- -e "1s|#!.*/sh|#!$SHELL_PATH|" \
- -e "1,3s|^exec wish|exec '$TCLTK_PATH'|" \
- "$INPUT" >"$OUTPUT"
+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"
-chmod a+x "$OUTPUT"
+case "$(basename "$INPUT")" in
+git-mergetool--lib.sh|git-sh-i18n.sh|git-sh-setup.sh)
+ ;;
+*)
+ chmod a+x "$OUTPUT"
+ ;;
+esac