Skip to content

Instantly share code, notes, and snippets.

@eddy0215-pro
Forked from show0k/install_git_lfs.sh
Last active August 12, 2018 12:08
Show Gist options
  • Save eddy0215-pro/d3bee37aad192f332c0fc039e29fe9bb to your computer and use it in GitHub Desktop.
Save eddy0215-pro/d3bee37aad192f332c0fc039e29fe9bb to your computer and use it in GitHub Desktop.
Compile and Install git-lfs on Raspberry Pi (with golang compilation)
install_git_lfs()
{
set -e
# Get out if git-lfs is already installed
if $(git-lfs &> /dev/null); then
echo "git-lfs is already installed"
return
fi
wget https://storage.googleapis.com/golang/go1.10.1.linux-armv6l.tar.gz
sudo tar -C /usr/local -xvf go1.10.1.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$PWD
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.bashrc
echo "export GOPATH=$PWD" >> $HOME/.bashrc
# Download and compile git-lfs
go get github.com/git-lfs/git-lfs
sudo mv bin/git-lfs /usr/bin/
hash -r
git lfs install
set +e
}
install_git_lfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment