Skip to content

Instantly share code, notes, and snippets.

@show0k
Last active March 5, 2019 18:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save show0k/388bf364da9347d7cfedcddd322eb8f4 to your computer and use it in GitHub Desktop.
Save show0k/388bf364da9347d7cfedcddd322eb8f4 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"
wget https://storage.googleapis.com/golang/go1.6.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 "PATH=$PATH:/usr/local/go/bin" >> $HOME/.bashrc
echo "GOPATH=$PWD" >> $HOME/.bashrc
# Download and compile git-lfs
mkdir -p src/github.com/github
pushd src/github.com/github
git clone https://github.com/github/git-lfs
pushd git-lfs
script/bootstrap
sudo mv bin/git-lfs /usr/bin/
popd
popd
popd
hash -r
git lfs install
set +e
}
install_git_lfs
@tkafka
Copy link

tkafka commented May 27, 2018

@eddy0215-pro
Copy link

eddy0215-pro commented Aug 8, 2018

This is very usefull to me~
but "script/bootstrap" replace to "script/release" tag v2.5.0
thank you!!

@abdulrahman004
Copy link

I get this error when using script/release -id 2
Error opening build_matrix.json: open bin/releases/build_matrix.json: no such file or directory

@byungsoo-motion
Copy link

FWIW, script/bootstrap has been replaced by make. (git-lfs v2.7.0)

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