Merge pull request #68 from johnstevenson/devel
[msysgit.git] / wine-start.sh
blob240b63429c3267f8141ee0f33be9d12fc46216d3
1 #!/bin/sh
3 WINECONSOLE=wineconsole
4 REBASE=
5 while test $# -gt 0
6 do
7 case "$1" in
8 --no-console)
9 WINECONSOLE=
11 --rebase)
12 REBASE=0x60000000
14 --rebase=*)
15 REBASE=${1#--rebase=}
18 break
20 esac
21 shift
22 done
24 if test $# -gt 0
25 then
26 echo "Unhandled options: $*" >&2
27 exit 1
30 cat << EOF
31 Please restart with --rebase if you see 'assertion "!inheap (s)" failed: ...'
32 EOF
34 die () {
35 echo "$*" >&2
36 exit 1
39 cd "$(dirname "$0")" &&
40 if test -n "$REBASE"
41 then
42 (cd bin && wine ../mingw/bin/rebase.exe -b "$REBASE" msys-1.0.dll) ||
43 die "Could not rebase msys-1.0.dll to $REBASE"
44 git update-index --assume-unchanged bin/msys-1.0.dll ||
45 cat << EOF
46 Did not find a (non-msysGit) git; please run
48 git update-index --assume-unchanged /bin/msys-1.0.dll
50 when Git was compiled
51 EOF
52 fi &&
53 exec wine $WINECONSOLE bin/bash --login -i ||
54 echo "Failure to start Wine!"