Skip to content

Instantly share code, notes, and snippets.

@russplaysguitar
Last active May 31, 2019 20:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russplaysguitar/11361799 to your computer and use it in GitHub Desktop.
Save russplaysguitar/11361799 to your computer and use it in GitHub Desktop.
make git
#!/bin/bash
root=$(pwd)
prefix="$root/vendor/git"
# build into $prefix
cd git-*
make NO_OPENSSL=YesPlease NO_CURL=YesPlease configure
./configure --prefix="${prefix}"
make -i
make -i install
# clean up source tree
cd $root
rm -rf git-*
# write profile.d
mkdir -p $root/profile.d
cat >$root/profile.d/git.sh <<EOF
LD_LIBRARY_PATH="/app/vendor/git/lib:${LD_LIBRARY_PATH}"
PATH="/app/vendor/git/bin:${PATH}"
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment