Skip to content

Instantly share code, notes, and snippets.

@sdhuang32
Created August 24, 2019 15:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sdhuang32/349d55ace0324e57681df01c1742038f to your computer and use it in GitHub Desktop.
Save sdhuang32/349d55ace0324e57681df01c1742038f 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
@immartian
Copy link

immartian commented Aug 6, 2021

good one, thanks. Does it work with git-annex as well, by any chance?

@sdhuang32
Copy link
Author

good one, thanks. Does it work with git-annex as well, by any chance?

I didn't try git-annex but I believe the same logic can be applied to other utilities/software packages. Have a try!

@jsntn
Copy link

jsntn commented May 27, 2022

Nice! Thanks for sharing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment