golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/linux-ppc64le/osuosl/setup-remote.sh (about) 1 #!/bin/bash 2 # Copyright 2022 The Go Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style 4 # license that can be found in the LICENSE file. 5 6 7 # See Makefile for usage 8 9 set -e 10 11 USER_AT_HOST=$1 12 if [ "$USER_AT_HOST" = "" ]; then 13 echo "Missing user@host arg; see Makefile for usage" >&2 14 exit 2 15 fi 16 HOST_TYPE=$2 17 if [ "$HOST_TYPE" = "" ]; then 18 echo "Missing host type arg; see Makefile for usage" >&2 19 exit 2 20 fi 21 22 GOARCH=ppc64le GOOS=linux go build -o rundockerbuildlet.ppc64le golang.org/x/build/cmd/rundockerbuildlet 23 24 rsync -e "ssh -i ~/.ssh/id_ed25519_golang1" -avPW ./ $USER_AT_HOST:./ 25 scp -i ~/.ssh/id_ed25519_golang1 $HOME/keys/${HOST_TYPE}.buildkey $USER_AT_HOST:.gobuildkey 26 27 # Install Docker, including adding our username to the "docker" group: 28 ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-docker.bash 29 30 # Now that we have Docker, "log in" again (with access to the docker 31 # group) and do the rest: 32 ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-buildlet.bash $HOST_TYPE