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 msysgit environment
38 echo -------------------------------------------------------
39 MSYSGIT_REPO_GIT
=git
://github.com
/msysgit
/msysgit
40 MSYSGIT_REPO_HTTP
=https
://github.com
/msysgit
/msysgit.git
44 for builtin in init unpack-objects update-ref fetch ls-remote clone checkout
46 ln "$INSTALL_PATH/installer-tmp/bin/git.exe" \
47 "$INSTALL_PATH/installer-tmp/bin/git-$builtin.exe"
50 git config
--system http.sslCAinfo
/bin
/curl-ca-bundle.crt
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@@
&&
62 git config remote.origin.url
$MSYSGIT_REPO_HTTP &&
64 echo -n "Please enter a HTTP proxy: " &&
67 export http_proxy
="$proxy" &&
70 error
"Could not get msysgit.git"
73 git config remote.origin.fetch
'+refs/heads/*:refs/remotes/origin/*'
76 echo -------------------------------------------------------
77 echo Checking out the msysgit @@MSYSGITBRANCH@@ branch
78 echo -------------------------------------------------------
79 git-checkout
-l -f -q -b @@MSYSGITBRANCH@@ origin
/@@MSYSGITBRANCH@@ ||
80 error Couldn
\'t checkout the @@MSYSGITBRANCH@@ branch
!
81 mkdir
-p .git
/hooks
&&
82 cp share
/msysGit
/post-checkout-hook .git
/hooks
/post-checkout ||
83 error Could not
install post-checkout hook
85 # TEMP: Remove pre-existing git directory
90 echo -------------------------------------------------------
91 echo Fetching the latest Git sources
92 echo -------------------------------------------------------
96 GIT_REPO_URL
=https
://github.com
/git
/git.git
97 HTMLDOCS_REPO_URL
=https
://github.com
/gitster
/git-htmldocs.git
98 MINGW_REPO_URL
=http
://repo.or.cz
/r
/git
/mingw.git
/
99 MINGW4MSYSGIT_REPO_URL
=https
://github.com
/msysgit
/git.git
100 GITCHEETAH_REPO_URL
=https
://github.com
/msysgit
/Git-Cheetah.git
103 GIT_REPO_URL
=git
://github.com
/git
/git
104 HTMLDOCS_REPO_URL
=git
://github.com
/gitster
/git-htmldocs.git
105 MINGW_REPO_URL
=git
://repo.or.cz
/git
/mingw.git
106 MINGW4MSYSGIT_REPO_URL
=git
://github.com
/msysgit
/git
107 GITCHEETAH_REPO_URL
=git
://github.com
/msysgit
/Git-Cheetah
111 git config submodule.git.url
$MINGW4MSYSGIT_REPO_URL &&
115 git config core.autocrlf input
&&
116 git config remote.junio.url
$GIT_REPO_URL &&
117 git config remote.junio.fetch
'+refs/heads/*:refs/remotes/junio/*' &&
118 git fetch
--tags junio
&&
119 git config remote.mingw.url
$MINGW_REPO_URL &&
120 git config remote.mingw.fetch
'+refs/heads/*:refs/remotes/mingw/*' &&
121 git fetch
--tags mingw
&&
122 git config remote.origin.url
$MINGW4MSYSGIT_REPO_URL &&
123 git config remote.origin.fetch
'+refs/heads/*:refs/remotes/origin/*' &&
124 git fetch
--tags origin
&&
125 if test -z "@@FOURMSYSGITBRANCH@@"
127 FOURMSYS
=origin
/devel
129 FOURMSYS
=origin
/@@FOURMSYSGITBRANCH@@
131 git config branch.
${FOURMSYS#origin/}.remote origin
&&
132 git config branch.
${FOURMSYS#origin/}.merge refs
/heads
/${FOURMSYS#origin/} &&
134 git checkout
-l -f -q -b ${FOURMSYS#origin/} $FOURMSYS ||
135 error Couldn
\'t update submodule git
!
138 echo -------------------------------------------------------
139 echo Fetching Git html
help submodule
140 echo -------------------------------------------------------
143 rm -rf /doc
/git
/html
&&
144 git config submodule.html.url
$HTMLDOCS_REPO_URL &&
145 mkdir
-p doc
/git
/html
&&
148 git config remote.origin.url
$HTMLDOCS_REPO_URL &&
149 git config remote.origin.fetch
'+refs/heads/master:refs/remotes/origin/master' &&
151 git checkout
-l -f -q $
(cd ..
/..
/..
&& git ls-tree HEAD
doc
/git
/html |
152 sed -n "s/^160000 commit \(.*\).doc\/git\/html$/\1/p") ||
153 error
"Couldn't update submodule doc/git/html (HTML help will not work)."
156 echo -------------------------------------------------------
157 echo Fetching git-cheetah submodule
158 echo -------------------------------------------------------
161 rm -rf /src
/git-cheetah
&&
162 git config submodule.git-cheetah.url
$GITCHEETAH_REPO_URL &&
163 mkdir
-p src
/git-cheetah
&&
164 cd src
/git-cheetah
&&
166 git config remote.origin.url
$GITCHEETAH_REPO_URL &&
167 git config remote.origin.fetch
'+refs/heads/*:refs/remotes/origin/*' &&
169 git-checkout
-l -f -q -b master origin
/master ||
170 error
"Could not update the submodule src/git-cheetah!"
172 # Copy profile.d/*.sh if there is any
175 if test -d "$INSTALL_PATH"/installer-tmp
/profile.d
177 mkdir
-p etc
/profile.d
&&
178 for file in "$INSTALL_PATH"/installer-tmp
/profile.d
/*.sh
180 cp "$file" etc
/profile.d
/