forked from msysgit/msysgit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wine-start.sh
executable file
·54 lines (47 loc) · 874 Bytes
/
wine-start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
WINECONSOLE=wineconsole
REBASE=
while test $# -gt 0
do
case "$1" in
--no-console)
WINECONSOLE=
;;
--rebase)
REBASE=0x60000000
;;
--rebase=*)
REBASE=${1#--rebase=}
;;
*)
break
;;
esac
shift
done
if test $# -gt 0
then
echo "Unhandled options: $*" >&2
exit 1
fi
cat << EOF
Please restart with --rebase if you see 'assertion "!inheap (s)" failed: ...'
EOF
die () {
echo "$*" >&2
exit 1
}
cd "$(dirname "$0")" &&
if test -n "$REBASE"
then
(cd bin && wine ../mingw/bin/rebase.exe -b "$REBASE" msys-1.0.dll) ||
die "Could not rebase msys-1.0.dll to $REBASE"
git update-index --assume-unchanged bin/msys-1.0.dll ||
cat << EOF
Did not find a (non-msysGit) git; please run
git update-index --assume-unchanged /bin/msys-1.0.dll
when Git was compiled
EOF
fi &&
exec wine $WINECONSOLE bin/bash --login -i ||
echo "Failure to start Wine!"