3 # We're already in the install directory
5 export PATH
="$INSTALL_PATH/installer-tmp/bin:$PATH"
9 echo INSTALLATION ABORTED
15 echo -------------------------------------------------------
16 echo Checking environment
17 echo -------------------------------------------------------
18 type cygpath
>/dev
/null
2>/dev
/null
&& {
19 echo "Cygwin seems to be in your system path. This was detected"
20 echo "by trying to run cygpath, which was found by this shell."
22 echo "Cygwin may cause severe problems, like crashes, if used in"
23 echo "combination with msysgit. Please remove Cygwin from you system"
24 echo "PATH environment variable."
26 echo "For assistance on how to control your environment variables"
27 echo "you should consult Microsoft's knowlege base:"
28 echo " Windows XP: http://support.microsoft.com/kb/310519"
29 echo " Windows NT: http://support.microsoft.com/kb/100843"
31 error
"Can not install msysgit when Cygwin is in PATH."
33 echo "Environment is clean. Can install msysgit."
36 echo -------------------------------------------------------
37 echo Fetching the latest MSys environment
38 echo -------------------------------------------------------
39 MSYSGIT_REPO_GIT
=git
://repo.or.cz
/msysgit.git
40 MSYSGIT_REPO_GIT_MOB
=ssh://mob@repo.or.cz
/srv
/git
/msysgit.git
41 MSYSGIT_REPO_HTTP
=http
://repo.or.cz
/r
/msysgit.git
45 for builtin in init unpack-objects update-ref fetch ls-remote clone checkout
47 ln "$INSTALL_PATH/installer-tmp/bin/git.exe" \
48 "$INSTALL_PATH/installer-tmp/bin/git-$builtin.exe"
52 git config core.autocrlf false
&&
53 git config remote.origin.url
$MSYSGIT_REPO_GIT &&
54 git config remote.origin.fetch \
55 +refs
/heads
/@@MSYSGITBRANCH@@
:refs
/remotes
/origin
/@@MSYSGITBRANCH@@
&&
56 git config branch.@@MSYSGITBRANCH@@.remote origin
&&
57 git config branch.@@MSYSGITBRANCH@@.merge refs
/heads
/@@MSYSGITBRANCH@@
&&
58 git config remote.mob.url
$MSYSGIT_REPO_GIT_MOB &&
59 git config remote.mob.fetch
+refs
/heads
/@@MSYSGITBRANCH@@
:refs
/remotes
/origin
/mob
&&
60 git config remote.mob.push @@MSYSGITBRANCH@@
:mob
&&
65 git config remote.origin.url
$MSYSGIT_REPO_HTTP &&
67 echo -n "Please enter a HTTP proxy: " &&
70 export http_proxy
="$proxy" &&
73 error
"Could not get msysgit.git"
76 git config remote.origin.fetch
'+refs/heads/*:refs/remotes/origin/*'
79 echo -------------------------------------------------------
80 echo Checking out the @@MSYSGITBRANCH@@ branch
81 echo -------------------------------------------------------
82 git-checkout
-l -f -q -b @@MSYSGITBRANCH@@ origin
/@@MSYSGITBRANCH@@ ||
83 error Couldn
\'t checkout the @@MSYSGITBRANCH@@ branch
!
84 mkdir
-p .git
/hooks
&&
85 cp share
/msysGit
/post-checkout-hook .git
/hooks
/post-checkout ||
86 error Could not
install post-checkout hook
88 # TEMP: Remove pre-existing git directory
93 echo -------------------------------------------------------
94 echo Fetching the latest MinGW Git sources
95 echo -------------------------------------------------------
99 GIT_REPO_URL
=http
://repo.or.cz
/r
/git.git
/
100 MINGW_REPO_URL
=http
://repo.or.cz
/r
/git
/mingw.git
/
101 MINGW4MSYSGIT_REPO_URL
=http
://repo.or.cz
/r
/git
/mingw
/4msysgit.git
/
104 GIT_REPO_URL
=git
://repo.or.cz
/git.git
105 MINGW_REPO_URL
=git
://repo.or.cz
/git
/mingw.git
106 MINGW4MSYSGIT_REPO_URL
=git
://repo.or.cz
/git
/mingw
/4msysgit.git
110 git config submodule.git.url
$MINGW4MSYSGIT_REPO_URL &&
114 git config core.autocrlf input
&&
115 git config remote.junio.url
$GIT_REPO_URL &&
116 git config remote.junio.fetch
'+refs/heads/*:refs/remotes/junio/*' &&
117 git fetch
--tags junio
&&
118 git config remote.mingw.url
$MINGW_REPO_URL &&
119 git config remote.mingw.fetch
'+refs/heads/*:refs/remotes/mingw/*' &&
120 git fetch
--tags mingw
&&
121 git config remote.origin.url
$MINGW4MSYSGIT_REPO_URL &&
122 git config remote.origin.fetch
'+refs/heads/*:refs/remotes/origin/*' &&
123 git fetch
--tags origin
&&
124 if test -z "@@FOURMSYSGITBRANCH@@"
126 FOURMSYS
=origin
/devel
128 FOURMSYS
=origin
/@@FOURMSYSGITBRANCH@@
130 git config branch.
${FOURMSYS#origin/}.remote origin
&&
131 git config branch.
${FOURMSYS#origin/}.merge refs
/heads
/${FOURMSYS#origin/} &&
133 git checkout
-l -f -q -b ${FOURMSYS#origin/} $FOURMSYS ||
134 error Couldn
\'t update submodule git
!
137 echo -------------------------------------------------------
138 echo Fetching HTML
help pages
139 echo -------------------------------------------------------
142 rm -rf /doc
/git
/html
&&
143 git config submodule.html.url
$GIT_REPO_URL &&
144 mkdir
-p doc
/git
/html
&&
147 git config remote.origin.url
$GIT_REPO_URL &&
148 git config remote.origin.fetch
'+refs/heads/html:refs/remotes/origin/html' &&
150 git checkout
-l -f -q $
(cd ..
/..
/..
&& git ls-tree HEAD
doc
/git
/html |
151 sed -n "s/^160000 commit \(.*\).doc\/git\/html$/\1/p") ||
152 error
"Couldn't update submodule doc/git/html (HTML help will not work)."