Files
Xiang Li 548a8432e2 script/vagrant: cp the build target to usr bin
Before this change, when I run `sudo rkt trust` it fails. I hope
we can also install rkt under usr/local/bin by default. So our
users can have a better experience when following our rkt basic
tutorial.
This issue was introduced by a recent script rewrote (#652)
2015-05-11 12:47:26 -07:00

29 lines
631 B
Bash

#!/bin/bash
set -xe
export DEBIAN_FRONTEND=noninteractive
APP_SPEC_VERSION=0.4.1
if ! [ -d app-spec ]; then
echo "Install actool ${APP_SPEC_VERSION}"
mkdir app-spec
wget -q -O appc-spec.tar.gz https://github.com/appc/spec/archive/v${APP_SPEC_VERSION}.tar.gz
tar xzvf appc-spec.tar.gz -C app-spec --strip-components=1
pushd app-spec
./build
sudo cp -v bin/* /usr/local/bin
popd
fi
which unsquash || sudo apt-get install -y squashfs-tools
pushd /vagrant
./build
sudo cp -v bin/* /usr/local/bin
cat << EOF | sudo tee /etc/profile.d/99rkt.sh
export PATH=$PWD/bin:\$PATH
export GOPATH=$PWD/gopath:\$GOPATH
EOF