Skip to content

Instantly share code, notes, and snippets.

@jsntn
Forked from sdhuang32/build-git.sh
Created May 27, 2022 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsntn/231ccb58ad760bcd1745601d622a0747 to your computer and use it in GitHub Desktop.
Save jsntn/231ccb58ad760bcd1745601d622a0747 to your computer and use it in GitHub Desktop.
#!/bin/bash
GIT_VERSION="2.23.0"
yum install -y gcc wget make curl-devel expat-devel \
gettext-devel openssl-devel perl-devel zlib-devel
cd ~
if [ ! -f git-${GIT_VERSION}.tar.gz ]; then
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz
fi
if [ -d git-${GIT_VERSION} ]; then
rm -rf git-${GIT_VERSION}
fi
tar zxvf git-${GIT_VERSION}.tar.gz
cd git-${GIT_VERSION}; ./configure --prefix=/share/Public/toolchain/
make all
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment