2017-02-01 00:45:59 +00:00
|
|
|
#!/bin/bash
|
2017-03-28 19:56:09 +00:00
|
|
|
set -xe
|
|
|
|
|
2017-02-01 00:45:59 +00:00
|
|
|
source /etc/os-release
|
2017-03-28 19:56:09 +00:00
|
|
|
|
2017-02-01 00:45:59 +00:00
|
|
|
case "${ID_LIKE:-${ID:-unknown}}" in
|
2017-03-28 19:56:09 +00:00
|
|
|
debian)
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt-get -q update
|
|
|
|
apt-get -q -y install linux-headers-`uname -r`
|
|
|
|
echo deb http://httpredir.debian.org/debian testing main > /etc/apt/sources.list
|
|
|
|
echo deb http://httpredir.debian.org/debian testing contrib >> /etc/apt/sources.list
|
|
|
|
apt-get -q update
|
|
|
|
apt-get -q -y install systemd curl
|
|
|
|
apt-get -q -y install apt make git btrfs-progs libdevmapper-dev
|
|
|
|
apt-get -q -y install zfs-dkms zfsutils-linux
|
|
|
|
apt-get -q -y install golang gccgo
|
|
|
|
;;
|
|
|
|
fedora)
|
|
|
|
dnf -y clean all
|
|
|
|
dnf -y install make git gcc btrfs-progs-devel device-mapper-devel
|
|
|
|
dnf -y install golang gcc-go
|
|
|
|
alternatives --set go /usr/lib/golang/bin/go
|
|
|
|
;;
|
|
|
|
unknown)
|
|
|
|
echo Unknown box OS, unsure of how to install required packages.
|
|
|
|
exit 1
|
|
|
|
;;
|
2017-02-01 00:45:59 +00:00
|
|
|
esac
|
|
|
|
mkdir -p /go/src/github.com/containers
|
|
|
|
rm -f /go/src/github.com/containers/storage
|
|
|
|
ln -s /vagrant /go/src/github.com/containers/storage
|
2017-03-28 19:56:09 +00:00
|
|
|
export GOPATH=/go
|
|
|
|
export PATH=/go/bin:${PATH}
|
|
|
|
go get github.com/golang/lint/...
|
|
|
|
exit 0
|