Created
February 3, 2016 08:43
-
-
Save patrikbeno/92ec81e12896931b3f69 to your computer and use it in GitHub Desktop.
Install/Upgrade Git in Babun/Cygwin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pact remove git | |
pact install make autoconf python perl tcl curl gettext gcc-g++ libcurl-devel libexpat-devel libiconv gettext-devel libiconv-devel cygwin64-libiconv | |
version=2.7.0 | |
curl -s https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz | tar xJv && cd git-${version} && ( | |
make configure && ./configure --prefix=/usr | |
make -i && make -i install | |
) | |
curl -s https://www.kernel.org/pub/software/scm/git/git-manpages-${version}.tar.xz | tar xJv -C /usr/share/man --no-same-owner --no-overwrite-dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you replace
version=2.7.0
withversion="$(curl -Lks https://mirrors.edge.kernel.org/pub/software/scm/git/ | grep -iv "manpages\|htmldocs\|core" | grep -i "tar.xz" | cut -d\" -f 2 | sort -nr | head -1 | sed 's|git-||g; s|.tar.xz||g')"
then this will install the latest version of git