Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script for install the latest Git version on Ubuntu
#!/usr/bin/env bash
# Run as root
# Use the '--no-doc' option for installation without doc and their dependencies.
apt-get update
apt-get install -y unzip build-essential autoconf \
libssl-dev libcurl4-openssl-dev \
libexpat1-dev gettext \
wget https://github.com/git/git/archive/master.zip;
unzip master.zip && cd git-master
make configure && ./configure --prefix=/usr
make all
make install
if [ "$1" != "--no-doc" ]; then
echo "Installing depencencies for docs build"
apt-get install -y asciidoc docbook2x
make -j4 doc
echo "Installing docs"
sudo make -j4 install-doc install-html
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.