summaryrefslogtreecommitdiff
path: root/git-gui/generate-script.sh
blob: 0dd2da92e3b5d4ce029734c3a395fc747e379e0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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"