blob: 1cec470b33c3adec83560505b5652520bb9d5aa0 [file] [log] [blame]
set -e
set -x
if [ "$HOST_TYPE" = "" ]; then
echo "Missing host type arg; this file is not supposed to be run directly; see Makefile for usage" >&2
exit 2
sudo mv .gobuildkey /etc/gobuild.key
sudo install rundockerbuildlet.ppc64le /usr/local/bin/rundockerbuildlet
curl -o stage0
chmod +x stage0
docker build -t golang/builder .
sed "s/env=XXX/env=$HOST_TYPE/" rundockerbuildlet.service > rundockerbuildlet.service.expanded
sudo cp rundockerbuildlet.service.expanded /etc/systemd/user/rundockerbuildlet.service
sudo systemctl enable /etc/systemd/user/rundockerbuildlet.service || true
sudo systemctl daemon-reload || true
sudo systemctl restart docker.service
sudo systemctl restart rundockerbuildlet.service