aboutsummaryrefslogtreecommitdiff
path: root/control/setup-control-node-via-ssh
blob: ade36ccbbb5042d013c12be98e4c223e0ea20697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
###############################################################################
# Copyright (c) 2011 Linaro
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
###############################################################################
#
# This script installs cloud-buildd on a completely pristine host via SSH

set -xe

if [ $# -ne 2 ]; then
    echo "Usage: $0 <host> <lp:linaro-android-build-tools>"
    exit 1
fi

HOST=$1
BRANCH=$2
CRED=ubuntu@$HOST
echo "Installing cloud-buildd on: $HOST"

ssh -A $CRED <<EOF
    set -xe
    sudo apt-get update -q
    sudo apt-get update -qq
    sudo apt-get install -qq -y bzr
    rm -rf linaro-android-build-tools
    bzr clone $BRANCH linaro-android-build-tools
    cd linaro-android-build-tools/control/
    ./setup-control-node $HOST
EOF