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
=repo.or.cz
/msysgit.git
40 MSYSGIT_REPO_HTTP
=repo.or.cz
/r
/msysgit.git
44 cp $INSTALL_PATH/installer-tmp
/bin
/git.exe
$INSTALL_PATH/installer-tmp
/bin
/git-init.exe
45 cp $INSTALL_PATH/installer-tmp
/bin
/git.exe
$INSTALL_PATH/installer-tmp
/bin
/git-unpack-objects.exe
46 cp $INSTALL_PATH/installer-tmp
/bin
/git.exe
$INSTALL_PATH/installer-tmp
/bin
/git-update-ref.exe
49 git config remote.origin.url git
://$MSYSGIT_REPO_GIT &&
50 git config remote.origin.fetch
+refs
/heads
/master
:refs
/remotes
/origin
/master
&&
51 git config branch.master.remote origin
&&
52 git config branch.master.merge refs
/heads
/master
&&
53 git config remote.mob.url
ssh://mob@
$MSYSGIT_REPO_GIT &&
54 git config remote.mob.fetch
+refs
/remote
/mob
:refs
/remotes
/origin
/mob
&&
55 git config remote.mob.push master
:mob
&&
60 git config remote.origin.url http
://$MSYSGIT_REPO_HTTP &&
62 error
"Could not get msysgit.git"
64 git config remote.origin.fetch
'+refs/heads/*:refs/remotes/origin/*'
67 echo -------------------------------------------------------
68 echo Checking out the master branch
69 echo -------------------------------------------------------
70 git-checkout
-l -f -b master origin
/master ||
71 error Couldn
\'t checkout the master branch
!
74 # TEMP: Remove pre-existing git directory
79 echo -------------------------------------------------------
80 echo Fetching the latest MinGW Git sources
81 echo -------------------------------------------------------
85 GIT_REPO_URL
=http
://repo.or.cz
/r
/git.git
/
86 MINGW_REPO_URL
=http
://repo.or.cz
/r
/git
/mingw.git
/
87 MINGW4MSYSGIT_REPO_URL
=http
://repo.or.cz
/r
/git
/mingw
/4msysgit.git
/
90 GIT_REPO_URL
=git
://repo.or.cz
/git.git
91 MINGW_REPO_URL
=git
://repo.or.cz
/git
/mingw.git
92 MINGW4MSYSGIT_REPO_URL
=git
://repo.or.cz
/git
/mingw
/4msysgit.git
93 # WORKAROUND current repo.or.cz breakage
94 MINGW4MSYSGIT_REPO_URL
=http
://repo.or.cz
/r
/git
/mingw
/4msysgit.git
/
98 git config submodule.git.url
$MINGW4MSYSGIT_REPO_URL &&
102 git config remote.junio.url
$GIT_REPO_URL &&
103 git config remote.junio.fetch
'+refs/heads/*:refs/remotes/junio/*' &&
105 git config remote.mingw.url
$MINGW_REPO_URL &&
106 git config remote.mingw.fetch
'+refs/heads/*:refs/remotes/mingw/*' &&
108 git config remote.origin.url
$MINGW4MSYSGIT_REPO_URL &&
109 git config remote.origin.fetch
'+refs/heads/*:refs/remotes/origin/*' &&
110 git fetch
--keep origin
&&
111 git read-tree
-m -u $
(cd ..
&& git ls-tree HEAD git |
112 sed -n "s/^160000 commit \(.*\) git$/\1/p") ||
113 error Couldn
\'t update submodules
!