Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save huang-xx/804165b5e9125fad9a8544c86f715779 to your computer and use it in GitHub Desktop.
Save huang-xx/804165b5e9125fad9a8544c86f715779 to your computer and use it in GitHub Desktop.
bash script for installing git without root access
#!/bin/bash
wget https://curl.haxx.se/download/curl-7.47.1.tar.gz
tar -xf curl-7.47.1.tar.gz
cd curl-7.47.1
./configure --prefix=$HOME/local
make
make install
wget http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gz
tar -xf expat-2.1.0.tar.gz
cd expat-2.1.0
./configure --prefix=$HOME/local
make
make install
wget https://github.com/git/git/archive/v2.6.4.tar.gz
tar -xf v2.6.4
cd git-2.6.4
make configure
./configure --prefix=$HOME/local --with-curl=$HOME/local/curl --with-expat=$HOME/local/expat
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment