Skip to content

Instantly share code, notes, and snippets.

@CoreyWycliffe
Forked from tkafka/install_git_lfs.sh
Last active May 31, 2019 17:19
Show Gist options
  • Save CoreyWycliffe/ee2fdc15e05a177a568c91da91acd06f to your computer and use it in GitHub Desktop.
Save CoreyWycliffe/ee2fdc15e05a177a568c91da91acd06f 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
GIT_LFS_BUILD=$HOME/.bin
# Install go 1.6 for ARMv6 (works also on ARMv7 & ARMv8)
sudo apt-get --yes --force-yes install git
mkdir -p $GIT_LFS_BUILD/go
pushd "$GIT_LFS_BUILD/go"
# clean up go folder
sudo rm -rf /usr/local/go
# find actual version on https://golang.org/dl/
wget https://storage.googleapis.com/golang/go1.10.2.linux-armv6l.tar.gz -O go.tar.gz
sudo tar -C /usr/local -xzf go.tar.gz
rm go.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/github/git-lfs
pushd src/github.com/github/git-lfs
make
sudo mv bin/git-lfs /usr/bin/
popd
popd
hash -r
git lfs install
set +e
}
install_git_lfs
@CoreyWycliffe
Copy link
Author

CoreyWycliffe commented May 31, 2019

Changed script\bootstrap to make and worked on Raspberry Pi 3

installed on the pi by using
wget https://gist.githubusercontent.com/CoreyWycliffe/ee2fdc15e05a177a568c91da91acd06f/raw/b2ae7f511674cc74ae8ea59b516e42875ea5bdf6/install_git_lfs.sh
then
chmod +x install_git_lfs.sh
then
./install_git_lfs.sh

I had problems with original scripts, see where I forked it from and edited the script so that it would run fully without modification. Just tested now and it works. Thank you to the original scripters.

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