git-lfs/script/centos-build
2015-05-13 10:48:37 -06:00

30 lines
733 B
Bash
Executable File

#!/bin/bash -eu
#
# This script works with CentOS 6 or 7
# The CentOS 5 kernel is too old for go's liking.
trap 'echo FAIL' ERR
if grep -q ' 6' /etc/redhat-release; then
rpm -q epel-release || rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
fi
yum install -y bison git golang make man
cd /tmp
[ -d git-lfs ] || git clone https://github.com/github/git-lfs
cd git-lfs
./script/bootstrap
install -D bin/git-lfs /usr/local/bin
git lfs init
# I don't know how to install ruby2.0 on CentOS6 yet
if grep -q ' 7' /etc/redhat-release; then
yum install ruby ruby-devel
gem install ronn
./script/man
install -D man/*.1 /usr/local/share/man/man1
git help lfs > /dev/null
fi
echo SUCCESS